@eui/core 22.0.0-alpha.9 → 22.0.0-alpha.90

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