@eui/core 19.3.3-snapshot-1754667754469 → 21.0.0-alpha.2

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 (203) hide show
  1. package/CHANGELOG.md +101 -0
  2. package/docs/changelog.html +120 -0
  3. package/docs/directives/TranslateMockDirective.html +0 -43
  4. package/docs/injectables/ApiQueueService.html +1 -55
  5. package/docs/injectables/EuiAppShellService.html +1 -103
  6. package/docs/injectables/EuiDynamicComponentService.html +0 -67
  7. package/docs/injectables/EuiDynamicMenuService.html +1 -43
  8. package/docs/injectables/EuiPermissionService.html +1 -43
  9. package/docs/injectables/EuiThemeService.html +1 -55
  10. package/docs/injectables/GlobalErrorHandler.html +0 -43
  11. package/docs/injectables/I18nLoader.html +1 -55
  12. package/docs/injectables/I18nService.html +1 -79
  13. package/docs/injectables/LocalForageService.html +1 -43
  14. package/docs/injectables/LocalStorageService.html +0 -54
  15. package/docs/injectables/LocaleService.html +1 -91
  16. package/docs/injectables/LocaleServiceMock.html +1 -31
  17. package/docs/injectables/LogService.html +1 -55
  18. package/docs/injectables/SessionStorageService.html +0 -43
  19. package/docs/injectables/StoreService.html +1 -42
  20. package/docs/injectables/UserService.html +1 -31
  21. package/docs/interceptors/AddLangParamInterceptor.html +0 -43
  22. package/docs/interceptors/HttpErrorHandlerInterceptor.html +0 -67
  23. package/docs/interceptors/UxRequestErrorModelInterceptor.html +0 -43
  24. package/docs/js/menu-wc.js +6 -6
  25. package/docs/js/menu-wc_es5.js +1 -1
  26. package/docs/js/search/search_index.js +2 -2
  27. package/docs/properties.html +1 -1
  28. package/fesm2022/eui-core.mjs +224 -315
  29. package/fesm2022/eui-core.mjs.map +1 -1
  30. package/index.d.ts +2470 -5
  31. package/index.d.ts.map +1 -1
  32. package/package.json +11 -11
  33. package/eui-core.d.ts.map +0 -1
  34. package/lib/eui-core.module.d.ts +0 -21
  35. package/lib/eui-core.module.d.ts.map +0 -1
  36. package/lib/helpers/css-utils.d.ts +0 -35
  37. package/lib/helpers/css-utils.d.ts.map +0 -1
  38. package/lib/helpers/date-helpers.d.ts +0 -3
  39. package/lib/helpers/date-helpers.d.ts.map +0 -1
  40. package/lib/helpers/dom-helpers.d.ts +0 -34
  41. package/lib/helpers/dom-helpers.d.ts.map +0 -1
  42. package/lib/helpers/event-helpers.d.ts +0 -2
  43. package/lib/helpers/event-helpers.d.ts.map +0 -1
  44. package/lib/helpers/form-helpers.d.ts +0 -11
  45. package/lib/helpers/form-helpers.d.ts.map +0 -1
  46. package/lib/helpers/format-helpers.d.ts +0 -13
  47. package/lib/helpers/format-helpers.d.ts.map +0 -1
  48. package/lib/helpers/http-helpers.d.ts +0 -8
  49. package/lib/helpers/http-helpers.d.ts.map +0 -1
  50. package/lib/helpers/index.d.ts +0 -10
  51. package/lib/helpers/index.d.ts.map +0 -1
  52. package/lib/helpers/injector.d.ts +0 -11
  53. package/lib/helpers/injector.d.ts.map +0 -1
  54. package/lib/helpers/utils.d.ts +0 -7
  55. package/lib/helpers/utils.d.ts.map +0 -1
  56. package/lib/interceptors/add-lang-param.interceptor.d.ts +0 -17
  57. package/lib/interceptors/add-lang-param.interceptor.d.ts.map +0 -1
  58. package/lib/interceptors/cache-prevention.interceptor.d.ts +0 -9
  59. package/lib/interceptors/cache-prevention.interceptor.d.ts.map +0 -1
  60. package/lib/interceptors/cors-security.interceptor.d.ts +0 -9
  61. package/lib/interceptors/cors-security.interceptor.d.ts.map +0 -1
  62. package/lib/interceptors/csrf-prevention.interceptor.d.ts +0 -9
  63. package/lib/interceptors/csrf-prevention.interceptor.d.ts.map +0 -1
  64. package/lib/interceptors/eu-login-session-timeout-handling.interceptor.d.ts +0 -20
  65. package/lib/interceptors/eu-login-session-timeout-handling.interceptor.d.ts.map +0 -1
  66. package/lib/interceptors/index.d.ts +0 -7
  67. package/lib/interceptors/index.d.ts.map +0 -1
  68. package/lib/interceptors/ux-request-error-model.interceptor.d.ts +0 -14
  69. package/lib/interceptors/ux-request-error-model.interceptor.d.ts.map +0 -1
  70. package/lib/services/app/eui-init-app.d.ts +0 -12
  71. package/lib/services/app/eui-init-app.d.ts.map +0 -1
  72. package/lib/services/app/eui-pre-init-app.d.ts +0 -17
  73. package/lib/services/app/eui-pre-init-app.d.ts.map +0 -1
  74. package/lib/services/app/eui-startup.d.ts +0 -5
  75. package/lib/services/app/eui-startup.d.ts.map +0 -1
  76. package/lib/services/app/factories/log.d.ts +0 -26
  77. package/lib/services/app/factories/log.d.ts.map +0 -1
  78. package/lib/services/app/index.d.ts +0 -3
  79. package/lib/services/app/index.d.ts.map +0 -1
  80. package/lib/services/config/defaults.d.ts +0 -12
  81. package/lib/services/config/defaults.d.ts.map +0 -1
  82. package/lib/services/config/tokens.d.ts +0 -20
  83. package/lib/services/config/tokens.d.ts.map +0 -1
  84. package/lib/services/dynamic-component/dynamic-component.service.d.ts +0 -42
  85. package/lib/services/dynamic-component/dynamic-component.service.d.ts.map +0 -1
  86. package/lib/services/dynamic-menu/dynamic-menu.service.d.ts +0 -15
  87. package/lib/services/dynamic-menu/dynamic-menu.service.d.ts.map +0 -1
  88. package/lib/services/errors/eui.error.d.ts +0 -14
  89. package/lib/services/errors/eui.error.d.ts.map +0 -1
  90. package/lib/services/errors/global-error-handler.d.ts +0 -11
  91. package/lib/services/errors/global-error-handler.d.ts.map +0 -1
  92. package/lib/services/errors/http-error-handler-callback-functions.d.ts +0 -7
  93. package/lib/services/errors/http-error-handler-callback-functions.d.ts.map +0 -1
  94. package/lib/services/errors/http-error-handler.interceptor.d.ts +0 -23
  95. package/lib/services/errors/http-error-handler.interceptor.d.ts.map +0 -1
  96. package/lib/services/errors/index.d.ts +0 -5
  97. package/lib/services/errors/index.d.ts.map +0 -1
  98. package/lib/services/eui-app-shell.service.d.ts +0 -110
  99. package/lib/services/eui-app-shell.service.d.ts.map +0 -1
  100. package/lib/services/eui-theme.service.d.ts +0 -52
  101. package/lib/services/eui-theme.service.d.ts.map +0 -1
  102. package/lib/services/eui-timezone.service.d.ts +0 -270
  103. package/lib/services/eui-timezone.service.d.ts.map +0 -1
  104. package/lib/services/growl/eui-growl.service.d.ts +0 -23
  105. package/lib/services/growl/eui-growl.service.d.ts.map +0 -1
  106. package/lib/services/growl/index.d.ts +0 -2
  107. package/lib/services/growl/index.d.ts.map +0 -1
  108. package/lib/services/i18n/i18n.loader.d.ts +0 -93
  109. package/lib/services/i18n/i18n.loader.d.ts.map +0 -1
  110. package/lib/services/i18n/i18n.resource.d.ts +0 -36
  111. package/lib/services/i18n/i18n.resource.d.ts.map +0 -1
  112. package/lib/services/i18n/i18n.service.d.ts +0 -102
  113. package/lib/services/i18n/i18n.service.d.ts.map +0 -1
  114. package/lib/services/i18n/index.d.ts +0 -4
  115. package/lib/services/i18n/index.d.ts.map +0 -1
  116. package/lib/services/index.d.ts +0 -20
  117. package/lib/services/index.d.ts.map +0 -1
  118. package/lib/services/loader/eui-loader.model.d.ts +0 -97
  119. package/lib/services/loader/eui-loader.model.d.ts.map +0 -1
  120. package/lib/services/loader/eui-loader.service.d.ts +0 -143
  121. package/lib/services/loader/eui-loader.service.d.ts.map +0 -1
  122. package/lib/services/loader/index.d.ts +0 -3
  123. package/lib/services/loader/index.d.ts.map +0 -1
  124. package/lib/services/locale/index.d.ts +0 -3
  125. package/lib/services/locale/index.d.ts.map +0 -1
  126. package/lib/services/locale/locale.service.d.ts +0 -103
  127. package/lib/services/locale/locale.service.d.ts.map +0 -1
  128. package/lib/services/locale/locale.service.mock.d.ts +0 -16
  129. package/lib/services/locale/locale.service.mock.d.ts.map +0 -1
  130. package/lib/services/log/index.d.ts +0 -4
  131. package/lib/services/log/index.d.ts.map +0 -1
  132. package/lib/services/log/log.module.d.ts +0 -16
  133. package/lib/services/log/log.module.d.ts.map +0 -1
  134. package/lib/services/log/log.service.d.ts +0 -28
  135. package/lib/services/log/log.service.d.ts.map +0 -1
  136. package/lib/services/log/log.service.mock.d.ts +0 -5
  137. package/lib/services/log/log.service.mock.d.ts.map +0 -1
  138. package/lib/services/permission/permission.service.d.ts +0 -188
  139. package/lib/services/permission/permission.service.d.ts.map +0 -1
  140. package/lib/services/queue/api-queue.service.d.ts +0 -278
  141. package/lib/services/queue/api-queue.service.d.ts.map +0 -1
  142. package/lib/services/queue/api-queue.service.mock.d.ts +0 -14
  143. package/lib/services/queue/api-queue.service.mock.d.ts.map +0 -1
  144. package/lib/services/queue/index.d.ts +0 -3
  145. package/lib/services/queue/index.d.ts.map +0 -1
  146. package/lib/services/storage/async-storage.service.d.ts +0 -45
  147. package/lib/services/storage/async-storage.service.d.ts.map +0 -1
  148. package/lib/services/storage/async-storage.service.mock.d.ts +0 -12
  149. package/lib/services/storage/async-storage.service.mock.d.ts.map +0 -1
  150. package/lib/services/storage/index.d.ts +0 -8
  151. package/lib/services/storage/index.d.ts.map +0 -1
  152. package/lib/services/storage/local-forage.service.d.ts +0 -49
  153. package/lib/services/storage/local-forage.service.d.ts.map +0 -1
  154. package/lib/services/storage/local-storage.service.d.ts +0 -36
  155. package/lib/services/storage/local-storage.service.d.ts.map +0 -1
  156. package/lib/services/storage/session-storage.service.d.ts +0 -35
  157. package/lib/services/storage/session-storage.service.d.ts.map +0 -1
  158. package/lib/services/storage/storage.service.d.ts +0 -29
  159. package/lib/services/storage/storage.service.d.ts.map +0 -1
  160. package/lib/services/storage/storage.service.mock.d.ts +0 -8
  161. package/lib/services/storage/storage.service.mock.d.ts.map +0 -1
  162. package/lib/services/store/actions/app.actions.d.ts +0 -119
  163. package/lib/services/store/actions/app.actions.d.ts.map +0 -1
  164. package/lib/services/store/actions/i18n.actions.d.ts +0 -21
  165. package/lib/services/store/actions/i18n.actions.d.ts.map +0 -1
  166. package/lib/services/store/actions/index.d.ts +0 -6
  167. package/lib/services/store/actions/index.d.ts.map +0 -1
  168. package/lib/services/store/actions/locale.actions.d.ts +0 -21
  169. package/lib/services/store/actions/locale.actions.d.ts.map +0 -1
  170. package/lib/services/store/actions/notifications.actions.d.ts +0 -20
  171. package/lib/services/store/actions/notifications.actions.d.ts.map +0 -1
  172. package/lib/services/store/actions/user.actions.d.ts +0 -57
  173. package/lib/services/store/actions/user.actions.d.ts.map +0 -1
  174. package/lib/services/store/index.d.ts +0 -5
  175. package/lib/services/store/index.d.ts.map +0 -1
  176. package/lib/services/store/ngrx_kit.d.ts +0 -54
  177. package/lib/services/store/ngrx_kit.d.ts.map +0 -1
  178. package/lib/services/store/reducers/app.reducers.d.ts +0 -7
  179. package/lib/services/store/reducers/app.reducers.d.ts.map +0 -1
  180. package/lib/services/store/reducers/core.reducers.d.ts +0 -7
  181. package/lib/services/store/reducers/core.reducers.d.ts.map +0 -1
  182. package/lib/services/store/reducers/i18n.reducers.d.ts +0 -7
  183. package/lib/services/store/reducers/i18n.reducers.d.ts.map +0 -1
  184. package/lib/services/store/reducers/index.d.ts +0 -8
  185. package/lib/services/store/reducers/index.d.ts.map +0 -1
  186. package/lib/services/store/reducers/locale.reducers.d.ts +0 -7
  187. package/lib/services/store/reducers/locale.reducers.d.ts.map +0 -1
  188. package/lib/services/store/reducers/meta.reducers.d.ts +0 -32
  189. package/lib/services/store/reducers/meta.reducers.d.ts.map +0 -1
  190. package/lib/services/store/reducers/notifications.reducers.d.ts +0 -7
  191. package/lib/services/store/reducers/notifications.reducers.d.ts.map +0 -1
  192. package/lib/services/store/reducers/user.reducers.d.ts +0 -7
  193. package/lib/services/store/reducers/user.reducers.d.ts.map +0 -1
  194. package/lib/services/store/store.service.d.ts +0 -72
  195. package/lib/services/store/store.service.d.ts.map +0 -1
  196. package/lib/services/store/store.service.mock.d.ts +0 -15
  197. package/lib/services/store/store.service.mock.d.ts.map +0 -1
  198. package/lib/services/user/index.d.ts +0 -3
  199. package/lib/services/user/index.d.ts.map +0 -1
  200. package/lib/services/user/user.service.d.ts +0 -46
  201. package/lib/services/user/user.service.d.ts.map +0 -1
  202. package/lib/services/user/user.service.mock.d.ts +0 -15
  203. package/lib/services/user/user.service.mock.d.ts.map +0 -1
@@ -1,93 +0,0 @@
1
- import { HttpClient } from '@angular/common/http';
2
- import { TranslateLoader } from '@ngx-translate/core';
3
- import { Observable } from 'rxjs';
4
- import { type EuiAppConfig, I18nLoaderConfig } from '@eui/base';
5
- import { I18nResourceImpl } from './i18n.resource';
6
- import { LogService } from '../log/log.service';
7
- import * as i0 from "@angular/core";
8
- interface ResourceError {
9
- isError: boolean;
10
- error?: string;
11
- resource?: I18nResourceImpl;
12
- }
13
- export interface LoadedResources {
14
- translations: object;
15
- hasError: boolean;
16
- errors?: Array<LoadedResourcesError>;
17
- }
18
- export interface LoadedResourcesError {
19
- resource: I18nResourceImpl;
20
- error: string;
21
- }
22
- export interface TranslationKeys {
23
- [key: string]: string;
24
- }
25
- export declare class I18nLoader implements TranslateLoader {
26
- protected http: HttpClient;
27
- protected logService: LogService;
28
- protected euiAppConfig: EuiAppConfig;
29
- protected resources: I18nResourceImpl[];
30
- protected failedResources: Array<LoadedResourcesError>;
31
- private logger;
32
- constructor(http: HttpClient, logService: LogService, euiAppConfig: EuiAppConfig);
33
- /**
34
- * Gets the translations from the server
35
- *
36
- * @param lang
37
- * @returns Observable<object>
38
- */
39
- getTranslation(lang: string): Observable<object>;
40
- /**
41
- * Adds resources
42
- *
43
- * @param config loader configuration
44
- * @returns Observable<any> | false
45
- */
46
- addResources(config: I18nLoaderConfig): I18nResourceImpl[];
47
- /**
48
- * Removes resources from the loader instance
49
- */
50
- removeResources(removedResources: I18nResourceImpl[]): void;
51
- /**
52
- * Loads an array of resources, by language
53
- *
54
- * @param resources the definition of the resources
55
- * @param lang the resource language to load
56
- * @returns Observable<any>
57
- */
58
- loadResources(resources: I18nResourceImpl[], lang: string): Observable<{
59
- hasError: boolean;
60
- translations: object;
61
- errors?: LoadedResourcesError[];
62
- }>;
63
- /**
64
- * Returns resources that failed
65
- */
66
- getFailedResources(): Array<LoadedResourcesError>;
67
- /**
68
- * Create resources from a config file
69
- *
70
- * @param config loader configuration
71
- * @returns I18nResourceImpl[] resources
72
- */
73
- protected createResources(config: I18nLoaderConfig): I18nResourceImpl[];
74
- /**
75
- * Loads a resource, by language
76
- *
77
- * @param resource the definition of the resource
78
- * @param lang the resource language to load
79
- * @returns Observable<any>
80
- */
81
- protected loadResource(resource: I18nResourceImpl, lang: string): Observable<TranslationKeys | ResourceError>;
82
- private getResourceCompileFunction;
83
- static ɵfac: i0.ɵɵFactoryDeclaration<I18nLoader, [null, { optional: true; }, null]>;
84
- static ɵprov: i0.ɵɵInjectableDeclaration<I18nLoader>;
85
- }
86
- export declare const translateConfig: {
87
- loader: {
88
- provide: typeof TranslateLoader;
89
- useClass: typeof I18nLoader;
90
- };
91
- };
92
- export {};
93
- //# sourceMappingURL=i18n.loader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"i18n.loader.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/i18n/i18n.loader.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAY,UAAU,EAAM,MAAM,MAAM,CAAC;AAGhD,OAAO,EAGH,KAAK,YAAY,EAGjB,gBAAgB,EAGnB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;;AAEhD,UAAU,aAAa;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AAED,MAAM,WAAW,eAAe;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,oBAAoB;IACjC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;C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AAU;CA0MtB;AAED,eAAO,MAAM,eAAe;;;;;CAK3B,CAAC"}
@@ -1,36 +0,0 @@
1
- export declare class I18nResourceImpl {
2
- protected prefix: string;
3
- protected suffix: string;
4
- protected compileTranslationsFn: (translations: unknown, lang: string) => unknown;
5
- /**
6
- * Resource constructor
7
- *
8
- * @param prefix the prefix of the resource
9
- * @param suffix the suffix of the resource, optional parameter
10
- * @param compileTranslationsFn compiler function, optional parameter
11
- */
12
- constructor(prefix: string, suffix?: string, compileTranslationsFn?: (translations: unknown, lang: string) => unknown);
13
- /**
14
- * Translations pre-processor
15
- *
16
- * @param translations the object to be pre-processed
17
- * @param lang the translations language
18
- * @returns the pre-processed translations
19
- */
20
- compileTranslations(translations: unknown, lang: string): unknown;
21
- /**
22
- * Indicates whether other object is equal-to this one.
23
- *
24
- * @param obj the reference object with which to compare
25
- * @returns true if this object is the same as obj, false otherwise
26
- */
27
- equals(obj: I18nResourceImpl): boolean;
28
- /**
29
- * The path to the resource
30
- *
31
- * @param lang the resource language
32
- * @returns the path
33
- */
34
- getPath(lang: string): string;
35
- }
36
- //# sourceMappingURL=i18n.resource.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"i18n.resource.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/i18n/i18n.resource.ts"],"names":[],"mappings":"AAAA,qBAAa,gBAAgB;IASrB,SAAS,CAAC,MAAM,EAAE,MAAM;IACxB,SAAS,CAAC,MAAM;IAChB,SAAS,CAAC,qBAAqB,EAAE,CAAC,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO;IAVrF;;;;;;OAMG;gBAEW,MAAM,EAAE,MAAM,EACd,MAAM,SAAK,EACX,qBAAqB,GAAE,CAAC,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,OAAiD;IAG/H;;;;;;OAMG;IACI,mBAAmB,CAAC,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO;IAIxE;;;;;OAKG;IACI,MAAM,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO;IAI7C;;;;;OAKG;IACI,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CAGvC"}
@@ -1,102 +0,0 @@
1
- import { OnDestroy, Signal } from '@angular/core';
2
- import { TranslateService } from '@ngx-translate/core';
3
- import { BehaviorSubject, Observable } from 'rxjs';
4
- import { GlobalConfig, EuiLazyService, EuiServiceStatus, I18nLoaderConfig, I18nServiceConfig, I18nState, ModuleConfig, DeepPartial } from '@eui/base';
5
- import { LogService } from '../log';
6
- import { StoreService } from '../store';
7
- import * as i0 from "@angular/core";
8
- export interface ModuleLoadEvent {
9
- ready: boolean;
10
- name: string;
11
- error?: any;
12
- }
13
- export declare class I18nService<T extends I18nState = I18nState> extends EuiLazyService<T | I18nState> implements OnDestroy {
14
- protected baseGlobalConfig: GlobalConfig;
15
- protected translateService: TranslateService;
16
- protected logService: LogService;
17
- protected store: StoreService<T>;
18
- private document;
19
- protected config: I18nServiceConfig;
20
- protected onModuleLoad: BehaviorSubject<ModuleLoadEvent>;
21
- private static readonly DEFAULT_STATE;
22
- /**
23
- * a single signal holding the state - initial state is null
24
- */
25
- private state;
26
- /**
27
- * a BehaviorSubject holding the state - initial state is null
28
- * This is the main source of truth for the state
29
- */
30
- private stateSubject;
31
- private subNotifier;
32
- constructor(baseGlobalConfig: GlobalConfig, translateService: TranslateService, logService: LogService, store: StoreService<T>, document: Document);
33
- ngOnDestroy(): void;
34
- getState(): Observable<T>;
35
- /**
36
- * @deprecated this will be removed in a future version
37
- * @param mapFn
38
- */
39
- getState<K = T>(mapFn?: (state: T) => K): Observable<K>;
40
- getState<a extends keyof DeepPartial<T>>(key?: a): Observable<DeepPartial<a>>;
41
- updateState(state: DeepPartial<T>): void;
42
- /**
43
- * @deprecated it will be removed in next version. Use updateState(partialState: DeepPartial<T>) instead
44
- * @param slice
45
- * @param reducer
46
- */
47
- updateState(slice: DeepPartial<T>, reducer: (state: T, action: DeepPartial<T>) => T): void;
48
- /**
49
- * This method is used to get the state as readonly signal.
50
- */
51
- getSignal(): Signal<T>;
52
- init(langState?: T): Observable<EuiServiceStatus>;
53
- /**
54
- * A pipe function that could serve as a wrapper of another observable
55
- * e.g. ngx-translate i18n.onReady('my_module').pipe(switchMap(()=>translate.get('eui.KEY')));
56
- * WARNING: onReady will emit only once for a loaded Module, going to another and then going back will not result
57
- * into another emission.
58
- *
59
- * @param moduleName the name of the module that has been given through the eUI globalConfig. In case non provided
60
- * fetch module name from the state.
61
- */
62
- onReady(moduleName?: string): Observable<ModuleLoadEvent>;
63
- lazyLoad(config: I18nLoaderConfig): Observable<EuiServiceStatus>;
64
- lazyLoadInit(moduleConfig: ModuleConfig, moduleName?: string): Observable<EuiServiceStatus>;
65
- /**
66
- * Add resources based of a config loader
67
- *
68
- * @param config I18nLoaderConfig
69
- * @param moduleName
70
- * @return Promise<EuiServiceStatus> an EuiServiceStatus when translation has fully loaded
71
- */
72
- addResources(config: I18nLoaderConfig, moduleName?: string): Observable<EuiServiceStatus>;
73
- /**
74
- * Prepares the default language
75
- */
76
- private preparedDefaultLanguage;
77
- /**
78
- * @param initLanguage if given default language to override default language coming from the
79
- * configuration token.
80
- */
81
- private setup;
82
- private bindActiveLangStateToTranslateService;
83
- private bindTranslateServiceLangChangeToState;
84
- private setDefaultLanguage;
85
- /**
86
- * change the currently used language
87
- *
88
- * @param lang is the language code based on the convention you used e.g. (en or en-EN)
89
- * @returns Observable that returns an object contain the object translation for given language after language
90
- * fully loaded.
91
- */
92
- private use;
93
- /**
94
- * updates the HTML element lang attribute
95
- *
96
- * @private
97
- */
98
- private updateHTMLDOMLang;
99
- static ɵfac: i0.ɵɵFactoryDeclaration<I18nService<any>, [null, null, { optional: true; }, null, null]>;
100
- static ɵprov: i0.ɵɵInjectableDeclaration<I18nService<any>>;
101
- }
102
- //# sourceMappingURL=i18n.service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"i18n.service.d.ts","s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IACH,OAAO,CAAC,uBAAuB;IAS/B;;;OAGG;IACH,OAAO,CAAC,KAAK;IAgCb,OAAO,CAAC,qCAAqC;IAU7C,OAAO,CAAC,qCAAqC;IAW7C,OAAO,CAAC,kBAAkB;IAS1B;;;;;;OAMG;IAGH,OAAO,CAAC,GAAG;IAIX;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;yCA7ThB,WAAW;6CAAX,WAAW;CAgUvB"}
@@ -1,4 +0,0 @@
1
- export * from './i18n.resource';
2
- export * from './i18n.loader';
3
- export * from './i18n.service';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/i18n/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAE9B,cAAc,gBAAgB,CAAC"}
@@ -1,20 +0,0 @@
1
- export * from './app/index';
2
- export * from './config/tokens';
3
- export * from './errors/index';
4
- export * from './store/index';
5
- export * from './queue/index';
6
- export * from './i18n/index';
7
- export * from './permission/permission.service';
8
- export * from './dynamic-menu/dynamic-menu.service';
9
- export * from './dynamic-component/dynamic-component.service';
10
- export * from './eui-app-shell.service';
11
- export * from './eui-timezone.service';
12
- export * from './eui-theme.service';
13
- export * from './storage/index';
14
- export * from './locale/index';
15
- export * from './loader/index';
16
- export * from './log/index';
17
- export * from './errors/index';
18
- export * from './user/index';
19
- export * from './growl/index';
20
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AACpD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
@@ -1,97 +0,0 @@
1
- /**
2
- * The status of a library
3
- * @enum Status
4
- * @property {string} LOADING - the library is loading
5
- * @property {string} LOADED - the library is loaded
6
- * @property {string} ERROR - the library failed to load
7
- */
8
- export declare enum Status {
9
- LOADING = "loading",
10
- LOADED = "loaded",
11
- ERROR = "error"
12
- }
13
- /**
14
- * A library is a set of script and style dependencies
15
- * that can be loaded dynamically
16
- * @interface Library
17
- * @property {string} name - global variable object name that the script will give to the library
18
- * @property {Dependency[]} dependencies - a set of script and style dependencies
19
- * @property {Status} status - the status of the library e.g. LOADED
20
- * @example
21
- *
22
- * const library: Library = {
23
- * name: 'Quill',
24
- * dependencies: [
25
- * {
26
- * name: 'quill',
27
- * url: 'https://cdn.quilljs.com/1.3.6/quill.js',
28
- * type: 'js',
29
- * requires: [],
30
- * loaded: false,
31
- * error: false,
32
- * },
33
- * {
34
- * name: 'quill',
35
- * url: 'https://cdn.quilljs.com/1.3.6/quill.snow.css',
36
- * type: 'css',
37
- * requires: [],
38
- * loaded: false,
39
- * error: false,
40
- * },
41
- * ],
42
- * status: Status.LOADING,
43
- * };
44
- */
45
- export interface Library {
46
- /** global variable object name that the script will give to the library */
47
- name: string;
48
- /** a set of script and style dependencies */
49
- dependencies: Dependency[];
50
- /** the status of the library e.g. LOADED */
51
- status: Status;
52
- }
53
- /**
54
- * A dependency is a script or style that can be loaded dynamically
55
- */
56
- export interface Dependency {
57
- /** an identifier for the dependency */
58
- name: string;
59
- /**
60
- * the url of the dependency
61
- * @example
62
- * https://cdn.quilljs.com/1.3.6/quill.js
63
- */
64
- url: string;
65
- /** the type of the dependency. Is it a style or script? */
66
- type: 'js' | 'css';
67
- /**
68
- * an array of dependencies corresponds to the Dependency.name
69
- * that must be loaded before this dependency
70
- * @example
71
- * ['quill-better-table']
72
- * where 'quill-better-table' is the name of the dependency
73
- * const betterTable: Dependency = {
74
- * name: 'quill-better-table',
75
- * url: 'https://cdn.quilljs.com/1.3.6/quill.js',
76
- * type: 'js',
77
- * requires: ['quill-better-table'],
78
- * }
79
- */
80
- requires: string[];
81
- /** the status of the dependency */
82
- status?: Status;
83
- /** the number of times the dependency has been loaded */
84
- retries?: number;
85
- }
86
- /**
87
- * Configuration for different policies
88
- */
89
- export interface Policy {
90
- /** Maximum number of retry attempts */
91
- maxAttempts: number;
92
- /** Time between retries in milliseconds */
93
- retryInterval: number;
94
- /** Time in milliseconds before considering a load attempt as failed */
95
- timeout: number;
96
- }
97
- //# sourceMappingURL=eui-loader.model.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"eui-loader.model.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/loader/eui-loader.model.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,oBAAY,MAAM;IACd,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,KAAK,UAAU;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,WAAW,OAAO;IACpB,2EAA2E;IAC3E,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,YAAY,EAAE,UAAU,EAAE,CAAC;IAC3B,4CAA4C;IAC5C,MAAM,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACvB,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ,2DAA2D;IAC3D,IAAI,EAAE,IAAI,GAAG,KAAK,CAAC;IACnB;;;;;;;;;;;;OAYG;IACH,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,mCAAmC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,MAAM;IACnB,uCAAuC;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,2CAA2C;IAC3C,aAAa,EAAE,MAAM,CAAC;IACtB,uEAAuE;IACvE,OAAO,EAAE,MAAM,CAAC;CACnB"}
@@ -1,143 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import { Status } from './eui-loader.model';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * A service for loading external dependencies dynamically to the DOM and keeping track of their status. Dependencies
6
- * can be loaded in any order and can have prerequisites. The service will load the prerequisites first and then load
7
- * the dependency. If a dependency fails to load, the service will retry loading it according to the retry policy.
8
- * The service will emit the status of the dependency when it changes. This is useful for showing a loading indicator
9
- * while the dependency is loading. In scenarios where the dependency is not required for the application to function,
10
- * the service will not block the application from loading if the dependency fails to load. The service will also
11
- * remove the dependency from the DOM if it is removed from the list. This is useful for scenarios where the dependency
12
- * is only required for a specific component, might be removed from the list when the component is destroyed, and it
13
- * will not affect the bundle size.
14
- *
15
- * @example
16
- * // Add a dependency
17
- * loader.addDependency('Quill', 'https://cdn.quilljs.com/1.3.6/quill.js', 'js');
18
- * // Get the status of a dependency
19
- * loader.getDependencyStatus('Quill');
20
- * // Listen for status changes
21
- * loader.statusChanges('Quill').subscribe((status: Status) => {
22
- * console.log(status);
23
- * });
24
- * // Remove a dependency
25
- * loader.removeDependency('Quill');
26
- * // Set the retry policy
27
- * loader.setRetryPolicy(3, 1000);
28
- * // Set the timeout policy
29
- * loader.setTimeoutPolicy(5000);
30
- * // Load a dependency with prerequisites
31
- * loader.addDependency('Quill', 'https://cdn.quilljs.com/1.3.6/quill.js', 'js', ['QuillStyle']);
32
- * loader.addDependency('QuillStyle', 'https://cdn.quilljs.com/1.3.6/quill.snow.css', 'css');
33
- * // Load a dependency with prerequisites and retry logic
34
- * loader.setRetryPolicy(3, 1000);
35
- * loader.setTimeoutPolicy(5000);
36
- * loader.addDependency('Quill', 'https://cdn.quilljs.com/1.3.6/quill.js', 'js', ['QuillStyle']);
37
- * loader.addDependency('QuillStyle', 'https://cdn.quilljs.com/1.3.6/quill.snow.css', 'css');
38
- */
39
- export declare class EuiLoaderService {
40
- /**
41
- * Stores the status and details of each dependency
42
- */
43
- private dependencies;
44
- /** Observable that emits the name of the dependency when its status changes */
45
- private onStatusChange;
46
- /**
47
- * Configuration for policies such as Retry and timeout for failed loads
48
- */
49
- private policy;
50
- /**
51
- * Add a dependency with its type (JS or CSS) and dependencies
52
- *
53
- * @param name The name of the dependency
54
- * @param url The URL of the dependency
55
- * @param type The type of the dependency (JS or CSS)
56
- * @param requires The dependencies that must be loaded before this one (optional)
57
- */
58
- addDependency(name: string, url: string, type: 'js' | 'css', requires?: string[]): void;
59
- /**
60
- * Remove a dependency from the DOM
61
- *
62
- * @param name The name of the dependency
63
- */
64
- removeDependency(name: string): void;
65
- /**
66
- * Allow users to configure the retry policy
67
- *
68
- * @param maxAttempts The maximum number of retry attempts
69
- * @param retryInterval The time between retries in milliseconds
70
- */
71
- setRetryPolicy(maxAttempts: number, retryInterval: number): void;
72
- /**
73
- * Allow users to configure the timeout policy
74
- *
75
- * @param time The time in milliseconds before considering a load attempt as failed
76
- * @see setRetryPolicy
77
- * @see statusChanges
78
- */
79
- setTimeoutPolicy(time: number): void;
80
- /**
81
- * Get the status of a dependency
82
- *
83
- * @param name The name of the dependency
84
- * @returns The status of the dependency
85
- * @deprecated Prefer using statusChanges instead
86
- * @see statusChanges
87
- */
88
- getDependencyStatus(name: string): Status | null;
89
- /**
90
- * Get the status of a dependency as an observable
91
- *
92
- * @param name The name of the dependency
93
- */
94
- statusChanges(name: string): Observable<Status>;
95
- /**
96
- * Load a dependency and its prerequisites
97
- *
98
- * @param name The name of the dependency
99
- * @see loadDependency
100
- */
101
- private loadDependency;
102
- /**
103
- * Load a JS script and append it to the root of the DOM
104
- * @param dependency
105
- */
106
- private loadScript;
107
- /**
108
- * Load a CSS style and append it to the head of the document
109
- * @param dependency
110
- */
111
- private loadStyle;
112
- /**
113
- * Error handling for a failed load
114
- * @param name
115
- * @param error
116
- */
117
- private handleError;
118
- /**
119
- * Get the script element from the DOM
120
- *
121
- * @param url
122
- * @private
123
- */
124
- private getScript;
125
- /**
126
- * Get the style element from the DOM
127
- *
128
- * @param url
129
- * @private
130
- */
131
- private getStyle;
132
- /**
133
- * Reload a dependency which can be either a script or a style. First remove
134
- * the element from the DOM and then load it again.
135
- *
136
- * @param dependency
137
- * @private
138
- */
139
- private reloadDependency;
140
- static ɵfac: i0.ɵɵFactoryDeclaration<EuiLoaderService, never>;
141
- static ɵprov: i0.ɵɵInjectableDeclaration<EuiLoaderService>;
142
- }
143
- //# sourceMappingURL=eui-loader.service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"eui-loader.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/loader/eui-loader.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAW,MAAM,MAAM,CAAC;AAC3C,OAAO,EAAsB,MAAM,EAAE,MAAM,oBAAoB,CAAC;;AAGhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,qBAGa,gBAAgB;IACzB;;OAEG;IACH,OAAO,CAAC,YAAY,CAAoB;IAExC,+EAA+E;IAC/E,OAAO,CAAC,cAAc,CAA0C;IAEhE;;OAEG;IACH,OAAO,CAAC,MAAM,CAIZ;IAEF;;;;;;;OAOG;IACH,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,KAAK,EAAE,QAAQ,GAAE,MAAM,EAAO,GAAG,IAAI;IAiB3F;;;;OAIG;IACH,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAsBpC;;;;;OAKG;IACH,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI;IAKhE;;;;;;OAMG;IACH,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAIpC;;;;;;;OAOG;IACH,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAKhD;;;;OAIG;IACH,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAQ/C;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IAwBtB;;;OAGG;IACH,OAAO,CAAC,UAAU;IAmBlB;;;OAGG;IACH,OAAO,CAAC,SAAS;IAmBjB;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAwBnB;;;;;OAKG;IACH,OAAO,CAAC,SAAS;IAIjB;;;;;OAKG;IACH,OAAO,CAAC,QAAQ;IAIhB;;;;;;OAMG;IACH,OAAO,CAAC,gBAAgB;yCA1Pf,gBAAgB;6CAAhB,gBAAgB;CAqQ5B"}
@@ -1,3 +0,0 @@
1
- export * from './eui-loader.service';
2
- export * from './eui-loader.model';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/loader/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC"}
@@ -1,3 +0,0 @@
1
- export * from './locale.service';
2
- export * from './locale.service.mock';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/locale/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC"}
@@ -1,103 +0,0 @@
1
- import { InjectionToken, OnDestroy, Signal } from '@angular/core';
2
- import { DeepPartial, EuiService, EuiServiceStatus, GlobalConfig, LocaleServiceConfig, LocaleState } from '@eui/base';
3
- import { Observable } from 'rxjs';
4
- import { StoreService } from '../store';
5
- import { LogService } from '../log';
6
- import { I18nService } from '../i18n';
7
- import * as i0 from "@angular/core";
8
- export type LocaleMapper = (locale: string) => string;
9
- export declare const LOCALE_ID_MAPPER: InjectionToken<LocaleMapper>;
10
- /**
11
- * LocaleService is responsible for managing locale states and configurations in an Angular application.
12
- * It utilizes the CLDR library to load and construct the locale for each region. This service allows
13
- * for dynamic loading of locales upon request and updates the state of the EUI app accordingly.
14
- *
15
- * Key functionalities include:
16
- * - Binding to a translation service for locale changes.
17
- * - Updating the Angular LOCALE_ID token.
18
- *
19
- * @template T - Extends LocaleState, representing the state structure for locales.
20
- * @template L - The type of the locale data.
21
- * @extends EuiService<T | LocaleState>
22
- */
23
- export declare class LocaleService<T extends LocaleState = LocaleState> extends EuiService<T | LocaleState> implements OnDestroy {
24
- protected store: StoreService;
25
- protected baseGlobalConfig: GlobalConfig;
26
- protected locale_id: string;
27
- private localeMapper;
28
- private i18n;
29
- private log;
30
- private static readonly DEFAULT_STATE;
31
- private readonly logger;
32
- private subNotifier;
33
- protected config: LocaleServiceConfig;
34
- /**
35
- * a single signal holding the state - initial state is null
36
- */
37
- private state;
38
- /**
39
- * a BehaviorSubject holding the state - initial state is null
40
- * This is the main source of truth for the state
41
- */
42
- private stateSubject;
43
- constructor(store: StoreService, baseGlobalConfig: GlobalConfig, locale_id: string, localeMapper: LocaleMapper, i18n: I18nService, log: LogService);
44
- ngOnDestroy(): void;
45
- getState(): Observable<T>;
46
- /**
47
- * Retrieves the state of the locale service. This method is overloaded to allow different ways of accessing the state.
48
- *
49
- * @template K - The type of the value to be returned. Defaults to the type of the locale state (T).
50
- *
51
- * @param {((state: T) => K)} [mapFn] - A function that maps the state to a specific form.
52
- * Takes the current state as an argument and returns the transformed state.
53
- * @returns {Observable<K>} - An observable that emits the transformed state.
54
- */
55
- getState<K = T>(mapFn?: (state: T) => K): Observable<K>;
56
- /**
57
- * @template a - A key that extends the keys of the state type T.
58
- * @param {a} [key] - A specific key to access a part of the state.
59
- * The key should be a property name of the state object.
60
- * @returns {Observable<Partial<a>>} - An observable that emits the value of the specified key in the state.
61
- * @param key
62
- */
63
- getState<a extends keyof DeepPartial<T>>(key?: a): Observable<DeepPartial<a>>;
64
- /**
65
- * Initializes the LocaleService with necessary configurations and state.
66
- * Binds language changes to the state and dynamically loads the appropriate locales.
67
- *
68
- * @param {LocaleState} [state] - Optional initial state for the locale service.
69
- * @returns {Observable<EuiServiceStatus>} - Observable emitting the status of the initialization.
70
- */
71
- init(state?: LocaleState): Observable<EuiServiceStatus>;
72
- /**
73
- * This method is used to update the state of the service with a new state.
74
- *
75
- * @param state
76
- */
77
- updateState(state: DeepPartial<T>): void;
78
- /**
79
- * This method is used to get the state as readonly signal.
80
- */
81
- getSignal(): Signal<T>;
82
- /**
83
- * Retrieves the previous locale used in the application.
84
- *
85
- * @returns {string} - The previous locale identifier.
86
- */
87
- get previousLocale(): string;
88
- /**
89
- * Retrieves the current locale used in the application.
90
- *
91
- * @returns {string} - The current locale identifier.
92
- */
93
- get currentLocale(): string;
94
- /**
95
- * Listens for language changes and dynamically sets the locale accordingly.
96
- *
97
- * @private
98
- */
99
- private bindTranslateServiceLangChangeToState;
100
- static ɵfac: i0.ɵɵFactoryDeclaration<LocaleService<any>, [null, null, null, { optional: true; }, { optional: true; }, { optional: true; }]>;
101
- static ɵprov: i0.ɵɵInjectableDeclaration<LocaleService<any>>;
102
- }
103
- //# sourceMappingURL=locale.service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"locale.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/locale/locale.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAGH,cAAc,EAEd,SAAS,EAET,MAAM,EACT,MAAM,eAAe,CAAC;AAEvB,OAAO,EACH,WAAW,EACX,UAAU,EACV,gBAAgB,EAEhB,YAAY,EAEZ,mBAAmB,EACnB,WAAW,EAEd,MAAM,WAAW,C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