@eui/core 22.0.0-alpha.75 → 22.0.0-alpha.77

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 (56) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/docs/changelog.html +20 -0
  3. package/docs/interfaces/Schema-23.html +1 -1
  4. package/docs/interfaces/Schema-24.html +1 -1
  5. package/docs/interfaces/Schema-25.html +1 -1
  6. package/docs/interfaces/Schema-26.html +1 -1
  7. package/docs/interfaces/Schema-27.html +1 -1
  8. package/docs/interfaces/Schema-28.html +1 -1
  9. package/docs/interfaces/Schema-29.html +1 -1
  10. package/docs/interfaces/Schema-30.html +1 -1
  11. package/docs/interfaces/Schema-31.html +1 -1
  12. package/docs/interfaces/Schema-32.html +1 -1
  13. package/docs/interfaces/Schema-33.html +1 -1
  14. package/docs/interfaces/Schema-34.html +1 -1
  15. package/docs/interfaces/Schema-35.html +1 -1
  16. package/docs/interfaces/Schema-36.html +1 -1
  17. package/docs/interfaces/Schema-37.html +368 -0
  18. package/docs/interfaces/TemplateSource.html +1 -1
  19. package/docs/js/menu-wc.js +3 -0
  20. package/docs/js/search/search_index.js +2 -2
  21. package/docs/json/documentation.json +1379 -852
  22. package/docs/llms.txt +48 -24
  23. package/docs/miscellaneous/functions.html +3944 -3601
  24. package/docs/miscellaneous/typealiases.html +2 -2
  25. package/docs/miscellaneous/variables.html +169 -53
  26. package/docs/overview.html +1 -1
  27. package/docs/properties.html +1 -1
  28. package/fesm2022/eui-core.mjs +82 -85
  29. package/fesm2022/eui-core.mjs.map +1 -1
  30. package/migrations.json +6 -0
  31. package/package.json +2 -2
  32. package/schematics/add-eui-imports/index.js +1 -1
  33. package/schematics/add-eui-imports/index.js.map +1 -1
  34. package/schematics/collection.json +5 -0
  35. package/schematics/migrate-all/index.js +1 -0
  36. package/schematics/migrate-all/index.js.map +1 -1
  37. package/schematics/migrate-eui-alert/index.js +2 -2
  38. package/schematics/migrate-eui-alert/index.js.map +1 -1
  39. package/schematics/migrate-eui-chip-list/index.js +1 -1
  40. package/schematics/migrate-eui-chip-list/index.js.map +1 -1
  41. package/schematics/migrate-eui-date-range-selector/schema.json +19 -0
  42. package/schematics/migrate-eui-datepicker/index.js +16 -111
  43. package/schematics/migrate-eui-datepicker/index.js.map +1 -1
  44. package/schematics/migrate-eui-table/index.js +1 -1
  45. package/schematics/migrate-eui-table/index.js.map +1 -1
  46. package/schematics/migrate-eui-tabs/index.js +5 -5
  47. package/schematics/migrate-eui-tabs/index.js.map +1 -1
  48. package/schematics/migrate-eui-tooltip/index.js +2 -2
  49. package/schematics/migrate-eui-tooltip/index.js.map +1 -1
  50. package/schematics/migrate-to-signals/index.js +1 -1
  51. package/schematics/migrate-to-signals/index.js.map +1 -1
  52. package/schematics/utils/date-adapter.d.ts +30 -0
  53. package/schematics/utils/date-adapter.js +125 -0
  54. package/schematics/utils/date-adapter.js.map +1 -0
  55. package/types/eui-core.d.ts +1 -0
  56. package/types/eui-core.d.ts.map +1 -1
@@ -63,33 +63,33 @@ const ROOT_LOG_CONFIG_TOKEN = new InjectionToken("logConfig");
63
63
  const SHOW_CONNECTION_STATUS_TOKEN = new InjectionToken("SHOW_CONNECTION_STATUS");
64
64
  const HTTP_ERROR_HANDLER_CONFIG_TOKEN = new InjectionToken("HTTP_ERROR_HANDLER_CONFIG");
65
65
  function getGlobalConfig(appConfig) {
66
- return Object.assign(DEFAULT_EUI_CONFIG.appConfig.global, appConfig && appConfig.global);
66
+ return Object.assign(DEFAULT_EUI_CONFIG.appConfig.global, appConfig?.global);
67
67
  }
68
68
  function getShowConnectionStatus(globalConfig) {
69
- return Object.assign({}, DEFAULT_EUI_CONFIG.appConfig.global.showConnectionStatus, globalConfig && globalConfig.showConnectionStatus);
69
+ return Object.assign({}, DEFAULT_EUI_CONFIG.appConfig.global.showConnectionStatus, globalConfig?.showConnectionStatus);
70
70
  }
71
71
  function getModuleConfig(appConfig, moduleName) {
72
- return Object.assign({}, appConfig && appConfig.modules && appConfig.modules[moduleName]);
72
+ return Object.assign({}, appConfig?.modules?.[moduleName]);
73
73
  }
74
74
  function getHttpErrorHandlingConfig(appConfig) {
75
- return Object.assign({}, appConfig && appConfig.httpErrorHandler);
75
+ return Object.assign({}, appConfig?.httpErrorHandler);
76
76
  }
77
77
  function getRootLogConfig(appConfig) {
78
- return Object.assign({}, appConfig && appConfig.log);
78
+ return Object.assign({}, appConfig?.log);
79
79
  }
80
80
  function prepareEuiAppConfigToken(euiConfig) {
81
- const environment = euiConfig && euiConfig.environment;
82
- const merge = environment.envDynamicConfig && environment.envDynamicConfig.merge && Array.isArray(environment.envDynamicConfig.merge) ? environment.envDynamicConfig.merge : [];
83
- const isDeepMerge = environment.envDynamicConfig && environment.envDynamicConfig.deepMerge ? environment.envDynamicConfig.deepMerge : false;
84
- const envAppJsonConfig = environment && environment.loadedEnvDynamicConfig;
85
- return mergeAppJsonConfigToAppConfig(mergeAppHandlerConfigToAppConfig(euiConfig && euiConfig.appConfig, environment && environment.envAppHandlersConfig), envAppJsonConfig, merge, isDeepMerge);
81
+ const environment = euiConfig?.environment;
82
+ const merge = environment?.envDynamicConfig?.merge && Array.isArray(environment.envDynamicConfig.merge) ? environment.envDynamicConfig.merge : [];
83
+ const isDeepMerge = environment?.envDynamicConfig?.deepMerge ? environment.envDynamicConfig.deepMerge : false;
84
+ const envAppJsonConfig = environment?.loadedEnvDynamicConfig;
85
+ return mergeAppJsonConfigToAppConfig(mergeAppHandlerConfigToAppConfig(euiConfig?.appConfig, environment?.envAppHandlersConfig), envAppJsonConfig, merge, isDeepMerge);
86
86
  }
87
87
  function mergeAppHandlerConfigToAppConfig(euiAppConfig, envAppHandler) {
88
88
  return Object.assign({}, euiAppConfig, envAppHandler);
89
89
  }
90
90
  function mergeAppJsonConfigToAppConfig(euiAppConfig, envAppJsonConfig, merge, isDeepMerge) {
91
91
  const deepMerged = {};
92
- if (merge && merge.length > 0) merge.forEach((key) => {
92
+ if (merge.length > 0) merge.forEach((key) => {
93
93
  if (envAppJsonConfig != null && envAppJsonConfig[key] && typeof envAppJsonConfig[key] === "object" && euiAppConfig != null && euiAppConfig[key] && typeof euiAppConfig[key] === "object") {
94
94
  if (isDeepMerge) {
95
95
  deepMerged[key] = {};
@@ -653,7 +653,7 @@ var StoreService = class StoreService {
653
653
  if (!keyOrMapFn) return state;
654
654
  return keyOrMapFn.split(".").reduce((acc, currKey) => {
655
655
  const record = acc;
656
- return record && record[currKey] !== void 0 ? record[currKey] : void 0;
656
+ return record != null ? record[currKey] : void 0;
657
657
  }, state);
658
658
  }), distinctUntilChanged((x, y) => isEqual(x, y)));
659
659
  }
@@ -938,7 +938,7 @@ var EuiCoreRootGuardClass = class {
938
938
  };
939
939
  const euiCoreRootGuardClass = () => new EuiCoreRootGuardClass();
940
940
  async function preInitApp(envConfig) {
941
- const envDynamicConfig = envConfig && envConfig.envDynamicConfig;
941
+ const envDynamicConfig = envConfig?.envDynamicConfig;
942
942
  if (envDynamicConfig) {
943
943
  envConfig.loadedEnvDynamicConfig = await loadEuiDynamicEnvironmentConfig(envDynamicConfig.uri, envDynamicConfig.configTimeout || 2e3);
944
944
  return envConfig;
@@ -962,12 +962,8 @@ const init = () => {
962
962
  const storeService = inject(StoreService);
963
963
  return new Promise((resolve) => {
964
964
  locationInitialized.then(() => {
965
- let appVersion;
966
- if (appConfig && appConfig.versions && appConfig.versions.app) appVersion = appConfig.versions.app;
967
- else appVersion = "0.0.0";
968
- let storageType;
969
- if (appConfig && appConfig["saveStateStorage"]) storageType = appConfig["saveStateStorage"];
970
- else storageType = BrowserStorageType.local;
965
+ const appVersion = appConfig?.versions?.app ?? "0.0.0";
966
+ const storageType = appConfig?.["saveStateStorage"] ?? BrowserStorageType.local;
971
967
  storeService.init(appVersion, storageType);
972
968
  storeService.handleAutoSave();
973
969
  resolve();
@@ -981,7 +977,7 @@ const errorCodes = { ERR_GENERIC: "ERR_GENERIC" };
981
977
  const messages = { ERR_GENERIC: "An error occured" };
982
978
  var ErrorSubClass = class {
983
979
  constructor(code, msg, args) {
984
- if (!msg && code && code in messages) {
980
+ if (!msg && typeof code === "string" && code in messages) {
985
981
  const message = messages[code];
986
982
  if (typeof message === "function") msg = message(...args.messageParams);
987
983
  else msg = message;
@@ -1061,7 +1057,7 @@ var HttpErrorHandlerInterceptor = class HttpErrorHandlerInterceptor {
1061
1057
  }
1062
1058
  getRouteConfig(error) {
1063
1059
  const routes = this.config.routes.filter((route) => {
1064
- return new RegExp("^" + route.path.split("*").join(".*") + "$").test(error.url) && (typeof route[error.status] !== "undefined" || typeof route.default !== "undefined");
1060
+ return new RegExp("^" + route.path.split("*").join(".*") + "$").test(error.url) && (route[error.status] !== void 0 || route.default !== void 0);
1065
1061
  });
1066
1062
  return routes.length > 0 ? routes[0] : null;
1067
1063
  }
@@ -1236,8 +1232,8 @@ var ApiQueueService = class ApiQueueService {
1236
1232
  }
1237
1233
  getQueue() {
1238
1234
  return this.store.select(this.getApiQueue).pipe(take(1), map((queue) => {
1239
- const queueArray = queue && Object.values(queue);
1240
- if (!queueArray || queueArray.length < 1) this.logger?.warn("No items in the queue exist.");
1235
+ const queueArray = Object.values(queue ?? {});
1236
+ if (queueArray.length < 1) this.logger?.warn("No items in the queue exist.");
1241
1237
  return queueArray;
1242
1238
  }));
1243
1239
  }
@@ -1371,10 +1367,10 @@ var I18nLoader = class I18nLoader {
1371
1367
  this.failedResources = [];
1372
1368
  const logService = this.logService;
1373
1369
  if (logService) this.logger = logService.getLogger("core.I18nLoader");
1374
- const i18nConfig = this.euiAppConfig.global && this.euiAppConfig.global.i18n;
1375
- const i18nLoaderConfig = i18nConfig && i18nConfig.i18nLoader;
1370
+ const i18nConfig = this.euiAppConfig.global?.i18n;
1371
+ const i18nLoaderConfig = i18nConfig?.i18nLoader;
1376
1372
  this.resources.push(...this.createResources(i18nLoaderConfig));
1377
- this.icuEnabled = !!(i18nConfig && i18nConfig.icuEnabled);
1373
+ this.icuEnabled = !!i18nConfig?.icuEnabled;
1378
1374
  }
1379
1375
  getTranslation(lang) {
1380
1376
  return this.loadResources(this.resources, lang).pipe(map((loadedResources) => {
@@ -1519,7 +1515,7 @@ var I18nService = class I18nService extends EuiLazyService {
1519
1515
  return this.stateSubject.asObservable().pipe(takeUntil(this.subNotifier), map((state) => {
1520
1516
  return keyOrMapFn.split(".").reduce((acc, currKey) => {
1521
1517
  const record = acc;
1522
- return record && record[currKey] !== void 0 ? record[currKey] : void 0;
1518
+ return record != null ? record[currKey] : void 0;
1523
1519
  }, state);
1524
1520
  }), distinctUntilChanged((x, y) => isEqual(x, y)));
1525
1521
  }
@@ -1532,7 +1528,7 @@ var I18nService = class I18nService extends EuiLazyService {
1532
1528
  return this.state;
1533
1529
  }
1534
1530
  init(langState) {
1535
- const initLang = langState && langState.activeLang ? langState.activeLang : this.preparedDefaultLanguage();
1531
+ const initLang = langState?.activeLang ?? this.preparedDefaultLanguage();
1536
1532
  const initState = {
1537
1533
  ...langState,
1538
1534
  activeLang: initLang
@@ -1551,7 +1547,7 @@ var I18nService = class I18nService extends EuiLazyService {
1551
1547
  return this.onModuleLoad.pipe(switchMap((evt) => moduleName ? of(evt) : this.store.select(getLastAddedModule).pipe(tap((m) => moduleName = m), map(() => evt))), filter((evt) => evt.ready === true && evt.name === moduleName), take(1));
1552
1548
  }
1553
1549
  lazyLoad(config) {
1554
- const moduleId = Math.floor(Math.random() * 1e5 + 1).toLocaleString();
1550
+ const moduleId = Math.floor(crypto.getRandomValues(/* @__PURE__ */ new Uint32Array(1))[0] / 4294967296 * 1e5 + 1).toLocaleString();
1555
1551
  return this.addResources(config, moduleId);
1556
1552
  }
1557
1553
  lazyLoadInit(moduleConfig, moduleName) {
@@ -1721,7 +1717,7 @@ const getStyle = (nativeEl, cssProp) => {
1721
1717
  const isStaticPositioned = (nativeEl) => (getStyle(nativeEl, "position") || "static") === "static";
1722
1718
  const parentOffsetEl = (nativeEl) => {
1723
1719
  let offsetParent = nativeEl.offsetParent || document;
1724
- while (offsetParent && offsetParent !== document && isStaticPositioned(offsetParent)) offsetParent = offsetParent.offsetParent;
1720
+ while (offsetParent !== null && offsetParent !== document && isStaticPositioned(offsetParent)) offsetParent = offsetParent.offsetParent;
1725
1721
  return offsetParent || document;
1726
1722
  };
1727
1723
  const getViewElement = (fixture, componentClass, klass) => {
@@ -1742,7 +1738,7 @@ const getViewElement = (fixture, componentClass, klass) => {
1742
1738
  };
1743
1739
  const closestMatchingParent = (target, className) => {
1744
1740
  let element = target;
1745
- while (element && element.nodeType === Node.ELEMENT_NODE) {
1741
+ while (element !== null && element.nodeType === Node.ELEMENT_NODE) {
1746
1742
  if (element.classList.contains(className)) return element;
1747
1743
  element = element.parentElement;
1748
1744
  }
@@ -1782,7 +1778,11 @@ const markControlsTouched = (group) => {
1782
1778
  const validateEmail = (c) => {
1783
1779
  return /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(c.value) ? null : { validateEmail: { valid: false } };
1784
1780
  };
1785
- const uniqueId = () => Math.random().toString(36).substring(2, 9);
1781
+ const uniqueId = () => {
1782
+ const array = /* @__PURE__ */ new Uint32Array(1);
1783
+ crypto.getRandomValues(array);
1784
+ return array[0].toString(36).padStart(7, "0").substring(0, 7);
1785
+ };
1786
1786
  const formatNumber = (value, fractionSize = 2, inDecimalSeparator = ",", inThousandSeparator = "") => {
1787
1787
  if (typeof value === "string" && isNaN(parseFloat(value))) return null;
1788
1788
  let decimalSeparator = "";
@@ -1797,7 +1797,7 @@ const formatNumber = (value, fractionSize = 2, inDecimalSeparator = ",", inThous
1797
1797
  decimalSeparator = separators[1];
1798
1798
  } else if (separators.length > 0) {
1799
1799
  if (nonChars.length > 1) return value.split(separators[0]).join("").replace(/\B(?=(\d{3})+(?!\d))/g, inThousandSeparator);
1800
- else return value.replace(separators[0], inDecimalSeparator).replace(/\B(?=(\d{3})+(?!\d))/g, inThousandSeparator);
1800
+ return value.replace(separators[0], inDecimalSeparator).replace(/\B(?=(\d{3})+(?!\d))/g, inThousandSeparator);
1801
1801
  } else return value.replace(/\B(?=(\d{3})+(?!\d))/g, inThousandSeparator) + (fractionSize > 0 ? inDecimalSeparator + "0".repeat(fractionSize) : "");
1802
1802
  value = value.split(thousandsSeparator).join("").replace(decimalSeparator, ".");
1803
1803
  }
@@ -2066,10 +2066,10 @@ var EuiPermissionService = class EuiPermissionService extends EuiService {
2066
2066
  return hasRight;
2067
2067
  }
2068
2068
  checkRight(rightId) {
2069
- return this.userRights.some((right) => right && right.id === rightId);
2069
+ return this.userRights.some((right) => right?.id === rightId);
2070
2070
  }
2071
2071
  checkPermission(rightId, permission) {
2072
- return this.userRights.some((right) => right && right.id === rightId && right.permissions && right.permissions.includes(permission));
2072
+ return this.userRights.some((right) => right?.id === rightId && right?.permissions?.includes(permission));
2073
2073
  }
2074
2074
  haveAllRights(rights) {
2075
2075
  if (!isDefined(rights)) throw Error("The rights should be an array but instead it's not defined!");
@@ -4692,6 +4692,7 @@ var EuiThemeService = class EuiThemeService {
4692
4692
  this.document = inject(DOCUMENT);
4693
4693
  this.config = inject(GLOBAL_CONFIG_TOKEN, { optional: true });
4694
4694
  this.asService = inject(EuiAppShellService);
4695
+ this._themeLink = null;
4695
4696
  this._state$ = new BehaviorSubject(initialState);
4696
4697
  const themeName = this.config?.eui?.theme || EuiTheme.DEFAULT;
4697
4698
  this.setActiveTheme(themeName, true);
@@ -4730,57 +4731,52 @@ var EuiThemeService = class EuiThemeService {
4730
4731
  const themes = this.state.themes;
4731
4732
  const themeIdx = themes.findIndex((t) => t.name === theme);
4732
4733
  if (themeIdx < 0) throw new Error("NO_THEME_FOUND");
4733
- else {
4734
- themes[themeIdx].isActive = isActive;
4735
- const themeFound = themes[themeIdx];
4736
- const status = initialState.theme;
4737
- switch (theme) {
4738
- case EuiTheme.DEFAULT:
4739
- status.isDefault = isActive;
4740
- break;
4741
- case EuiTheme.ECL_EC:
4742
- status.isEclEc = isActive;
4743
- break;
4744
- case EuiTheme.ECL_EC_RTL:
4745
- status.isEclEcRtl = isActive;
4746
- break;
4747
- case EuiTheme.ECL_EU:
4748
- status.isEclEu = isActive;
4749
- break;
4750
- case EuiTheme.ECL_EU_RTL:
4751
- status.isEclEuRtl = isActive;
4752
- break;
4753
- case EuiTheme.DARK:
4754
- status.isDark = isActive;
4755
- break;
4756
- case EuiTheme.HIGH_CONTRAST:
4757
- status.isHighContrast = isActive;
4758
- break;
4759
- case EuiTheme.COMPACT: status.isCompact = isActive;
4760
- }
4761
- this._state$.next({
4762
- themes,
4763
- theme: status
4764
- });
4765
- this._renderTheme(themeFound, isActive);
4734
+ themes[themeIdx].isActive = isActive;
4735
+ const themeFound = themes[themeIdx];
4736
+ const status = initialState.theme;
4737
+ switch (theme) {
4738
+ case EuiTheme.DEFAULT:
4739
+ status.isDefault = isActive;
4740
+ break;
4741
+ case EuiTheme.ECL_EC:
4742
+ status.isEclEc = isActive;
4743
+ break;
4744
+ case EuiTheme.ECL_EC_RTL:
4745
+ status.isEclEcRtl = isActive;
4746
+ break;
4747
+ case EuiTheme.ECL_EU:
4748
+ status.isEclEu = isActive;
4749
+ break;
4750
+ case EuiTheme.ECL_EU_RTL:
4751
+ status.isEclEuRtl = isActive;
4752
+ break;
4753
+ case EuiTheme.DARK:
4754
+ status.isDark = isActive;
4755
+ break;
4756
+ case EuiTheme.HIGH_CONTRAST:
4757
+ status.isHighContrast = isActive;
4758
+ break;
4759
+ case EuiTheme.COMPACT: status.isCompact = isActive;
4766
4760
  }
4761
+ this._state$.next({
4762
+ themes,
4763
+ theme: status
4764
+ });
4765
+ this._renderTheme(themeFound, isActive);
4767
4766
  }
4768
4767
  _renderTheme(themeFound, isActive) {
4769
4768
  if (themeFound.name === EuiTheme.COMPACT) {
4770
4769
  if (isActive) this.asService.setBaseFontSize("14px");
4771
4770
  else this.asService.setBaseFontSize("16px");
4772
- const compactLink = this.document.getElementById("eui-theme");
4773
- this._renderThemeCss(themeFound, isActive, compactLink);
4771
+ this._renderThemeCss(themeFound, isActive, this._themeLink);
4774
4772
  } else if (themeFound.name === EuiTheme.ECL_EC_RTL || themeFound.name === EuiTheme.ECL_EU_RTL) return;
4775
- else if (themeFound.name === EuiTheme.ECL_EC || themeFound.name === EuiTheme.ECL_EU) {
4776
- const rtlLink = this.document.getElementById("eui-theme");
4777
- this._renderThemeCss(themeFound, isActive, rtlLink);
4778
- } else this._renderThemeCss(themeFound, isActive, null);
4773
+ else if (themeFound.name === EuiTheme.ECL_EC || themeFound.name === EuiTheme.ECL_EU) this._renderThemeCss(themeFound, isActive, this._themeLink);
4774
+ else this._renderThemeCss(themeFound, isActive, null);
4779
4775
  }
4780
4776
  _renderThemeCss(themeFound, isActive, link) {
4781
- const head = this.document.getElementsByTagName("head")[0];
4777
+ const head = this.document.head;
4782
4778
  if (isActive) {
4783
- if (themeFound.cssClass) document.querySelector("html")?.classList.add(themeFound.cssClass);
4779
+ if (themeFound.cssClass) this.document.documentElement.classList.add(themeFound.cssClass);
4784
4780
  if (themeFound.styleSheet) {
4785
4781
  if (link) link.href = `assets/${themeFound.styleSheet}`;
4786
4782
  else {
@@ -4789,10 +4785,11 @@ var EuiThemeService = class EuiThemeService {
4789
4785
  style.rel = "stylesheet";
4790
4786
  style.href = `assets/${themeFound.styleSheet}`;
4791
4787
  head.appendChild(style);
4788
+ this._themeLink = style;
4792
4789
  }
4793
4790
  }
4794
4791
  } else {
4795
- if (themeFound.cssClass) document.querySelector("html")?.classList.remove(themeFound.cssClass);
4792
+ if (themeFound.cssClass) this.document.documentElement.classList.remove(themeFound.cssClass);
4796
4793
  if (themeFound.styleSheet) {
4797
4794
  if (link) link.media = "";
4798
4795
  }
@@ -5103,7 +5100,7 @@ var LocaleService = class LocaleService extends EuiService {
5103
5100
  return this.stateSubject.asObservable().pipe(map((state) => {
5104
5101
  return keyOrMapFn.split(".").reduce((acc, currKey) => {
5105
5102
  const record = acc;
5106
- return record && record[currKey] !== void 0 ? record[currKey] : void 0;
5103
+ return record != null ? record[currKey] : void 0;
5107
5104
  }, state);
5108
5105
  }), distinctUntilChanged((x, y) => isEqual(x, y)));
5109
5106
  }
@@ -5263,7 +5260,7 @@ var EuiLoaderService = class EuiLoaderService {
5263
5260
  };
5264
5261
  }
5265
5262
  addDependency(name, url, type, requires = []) {
5266
- if (!this.dependencies.find((d) => d.name === name)) {
5263
+ if (!this.dependencies.find((d) => d["name"] === name)) {
5267
5264
  this.dependencies.push({
5268
5265
  name,
5269
5266
  url,
@@ -5276,7 +5273,7 @@ var EuiLoaderService = class EuiLoaderService {
5276
5273
  }
5277
5274
  }
5278
5275
  removeDependency(name) {
5279
- const index = this.dependencies.findIndex((d) => d.name === name);
5276
+ const index = this.dependencies.findIndex((d) => d["name"] === name);
5280
5277
  if (index === -1) return;
5281
5278
  const dependency = this.dependencies.at(index);
5282
5279
  let element = null;
@@ -5294,13 +5291,13 @@ var EuiLoaderService = class EuiLoaderService {
5294
5291
  this.policy.timeout = time;
5295
5292
  }
5296
5293
  getDependencyStatus(name) {
5297
- return this.dependencies.find((d) => d.name === name)?.status || null;
5294
+ return this.dependencies.find((d) => d["name"] === name)?.status || null;
5298
5295
  }
5299
5296
  statusChanges(name) {
5300
- return this.onStatusChange.asObservable().pipe(filter((loadedName) => loadedName === name), map(() => this.dependencies.find((d) => d.name === name)?.status));
5297
+ return this.onStatusChange.asObservable().pipe(filter((loadedName) => loadedName === name), map(() => this.dependencies.find((d) => d["name"] === name)?.status));
5301
5298
  }
5302
5299
  loadDependency(name) {
5303
- const dependency = this.dependencies.find((d) => d.name === name);
5300
+ const dependency = this.dependencies.find((d) => d["name"] === name);
5304
5301
  if (dependency === void 0) {
5305
5302
  console.error(`Dependency ${name} not found in list.`);
5306
5303
  return;
@@ -5339,7 +5336,7 @@ var EuiLoaderService = class EuiLoaderService {
5339
5336
  document.head.append(link);
5340
5337
  }
5341
5338
  handleError(name, error) {
5342
- const dependency = this.dependencies.find((d) => d.name === name);
5339
+ const dependency = this.dependencies.find((d) => d["name"] === name);
5343
5340
  console.error(`Error loading ${name}: ${error}`);
5344
5341
  if (dependency) {
5345
5342
  console.error(`Error loading ${name}: ${error}`);
@@ -5433,7 +5430,7 @@ var UserService = class UserService extends EuiService {
5433
5430
  return this.stateSubject.asObservable().pipe(map((state) => {
5434
5431
  return keyOrMapFn.split(".").reduce((acc, currKey) => {
5435
5432
  const record = acc;
5436
- return record && record[currKey] !== void 0 ? record[currKey] : void 0;
5433
+ return record != null ? record[currKey] : void 0;
5437
5434
  }, state);
5438
5435
  }), distinctUntilChanged((x, y) => isEqual(x, y)));
5439
5436
  }