@centreon/ui-context 25.5.0 → 25.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@centreon/ui-context",
3
- "version": "25.5.0",
3
+ "version": "25.7.0",
4
4
  "description": "Centreon UI shared context",
5
5
  "main": "src/index.ts",
6
6
  "keywords": [],
@@ -0,0 +1,3 @@
1
+ import { atom } from 'jotai';
2
+
3
+ export const browserLocaleAtom = atom(navigator.language.slice(0, 2));
package/src/defaults.ts CHANGED
@@ -7,7 +7,7 @@ const defaultUser: User = {
7
7
  id: undefined,
8
8
  isAdmin: undefined,
9
9
  isExportButtonEnabled: false,
10
- locale: navigator.language,
10
+ locale: null,
11
11
  name: '',
12
12
  themeMode: ThemeMode.light,
13
13
  timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
package/src/index.ts CHANGED
@@ -23,6 +23,8 @@ export {
23
23
  federatedModulesAtom,
24
24
  federatedWidgetsAtom
25
25
  } from './federatedModulesAndWidgetsAtoms';
26
+ export { browserLocaleAtom } from './browserLocaleAtom';
27
+ export { isResourceStatusFullSearchEnabledAtom } from './isResourceStatusFullSearchEnabledAtom';
26
28
 
27
29
  export type {
28
30
  User,
@@ -0,0 +1,3 @@
1
+ import { atom } from 'jotai';
2
+
3
+ export const isResourceStatusFullSearchEnabledAtom = atom(false);
package/src/types.ts CHANGED
@@ -26,7 +26,7 @@ export interface User {
26
26
  id?: number;
27
27
  isAdmin?: boolean;
28
28
  isExportButtonEnabled: boolean;
29
- locale: string;
29
+ locale: string | null;
30
30
  name: string;
31
31
  themeMode?: ThemeMode;
32
32
  timezone: string;