@centreon/ui-context 24.7.2 → 24.7.3

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,11 +1,11 @@
1
1
  {
2
2
  "name": "@centreon/ui-context",
3
- "version": "24.7.2",
3
+ "version": "24.7.3",
4
4
  "description": "Centreon UI shared context",
5
5
  "main": "src/index.ts",
6
6
  "keywords": [],
7
7
  "author": "centreon@centreon.com",
8
- "license": "MIT",
8
+ "license": "GPL-2.0",
9
9
  "scripts": {
10
10
  "eslint": "eslint ./src --ext .ts --max-warnings 0",
11
11
  "eslint:fix": "pnpm eslint --fix"
package/src/defaults.ts CHANGED
@@ -3,8 +3,6 @@ import { User, ThemeMode, ListingVariant } from './types';
3
3
  const defaultUser: User = {
4
4
  alias: '',
5
5
  default_page: '/monitoring/resources',
6
- id: undefined,
7
- isAdmin: undefined,
8
6
  isExportButtonEnabled: false,
9
7
  locale: navigator.language,
10
8
  name: '',
package/src/index.ts CHANGED
@@ -6,20 +6,11 @@ export { default as cloudServicesAtom } from './cloudServicesAtom';
6
6
  export { default as acknowledgementAtom } from './acknowledgementAtom';
7
7
  export { default as resourceStorageOptimizationModeAtom } from './resourceStorageOptimizationMode';
8
8
  export { default as platformNameAtom } from './platformNameAtom';
9
- export { ThemeMode, ListingVariant, DashboardGlobalRole } from './types';
9
+ export { ThemeMode, ListingVariant } from './types';
10
10
  export {
11
11
  platformFeaturesAtom,
12
12
  featureFlagsDerivedAtom
13
- } from './platformFeauresAtom';
14
-
15
- export { platformVersionsAtom } from './platformVersionsAtom';
16
-
17
- export { isOnPublicPageAtom } from './isOnPublicPageAtom';
18
- export { additionalResourcesAtom } from './additionalResources';
19
- export {
20
- federatedModulesAtom,
21
- federatedWidgetsAtom
22
- } from './federatedModulesAndWidgetsAtoms';
13
+ } from './platformFeaturesAtom';
23
14
 
24
15
  export type {
25
16
  User,
@@ -30,8 +21,6 @@ export type {
30
21
  CloudServices,
31
22
  Acknowledgement,
32
23
  Acl,
33
- DashboardRolesAndPermissions,
34
24
  FeatureFlags,
35
- PlatformFeatures,
36
- AdditionalResource
25
+ PlatformFeatures
37
26
  } from './types';
@@ -3,6 +3,7 @@ import { atom } from 'jotai';
3
3
  import { FeatureFlags, PlatformFeatures } from './types';
4
4
 
5
5
  export const platformFeaturesAtom = atom<PlatformFeatures | null>(null);
6
+
6
7
  export const featureFlagsDerivedAtom = atom<FeatureFlags | null>(
7
8
  (get): FeatureFlags => {
8
9
  const platformFeatures = get(platformFeaturesAtom);
package/src/types.ts CHANGED
@@ -5,25 +5,9 @@ export enum ListingVariant {
5
5
  extended = 'extended'
6
6
  }
7
7
 
8
- export enum DashboardGlobalRole {
9
- administrator = 'administrator',
10
- creator = 'creator',
11
- viewer = 'viewer'
12
- }
13
-
14
- export interface DashboardRolesAndPermissions {
15
- createDashboards: boolean;
16
- globalUserRole: DashboardGlobalRole;
17
- manageAllDashboards: boolean;
18
- viewDashboards: boolean;
19
- }
20
-
21
8
  export interface User {
22
9
  alias: string;
23
- dashboard?: DashboardRolesAndPermissions | null;
24
10
  default_page?: string | null;
25
- id?: number;
26
- isAdmin?: boolean;
27
11
  isExportButtonEnabled: boolean;
28
12
  locale: string;
29
13
  name: string;
@@ -86,11 +70,8 @@ export interface Downtime {
86
70
  export interface FeatureFlags {
87
71
  adExclusionPeriods?: boolean;
88
72
  dashboard?: boolean;
89
- dashboardPlayList?: boolean;
90
73
  notification?: boolean;
91
- resourceStatusFilterRevamp?: boolean;
92
74
  resourceStatusTreeView?: boolean;
93
- resouresTableOpenTickets: boolean;
94
75
  vault?: boolean;
95
76
  }
96
77
 
@@ -98,48 +79,3 @@ export interface PlatformFeatures {
98
79
  featureFlags: FeatureFlags;
99
80
  isCloudPlatform: boolean;
100
81
  }
101
-
102
- export interface AdditionalResource {
103
- baseEndpoint: string;
104
- defaultMonitoringParameter?: Record<string, boolean | number | string>;
105
- label: string;
106
- resourceType: string;
107
- }
108
-
109
- interface FederatedComponentsConfiguration {
110
- federatedComponents: Array<string>;
111
- panelMinHeight?: number;
112
- panelMinWidth?: number;
113
- path: string;
114
- title?: string;
115
- }
116
-
117
- interface PageComponent {
118
- children?: string;
119
- component: string;
120
- featureFlag?: string;
121
- route: string;
122
- }
123
-
124
- export interface FederatedModule {
125
- federatedComponentsConfiguration: Array<FederatedComponentsConfiguration>;
126
- federatedPages: Array<PageComponent>;
127
- moduleFederationName: string;
128
- moduleName: string;
129
- preloadScript?: string;
130
- remoteEntry: string;
131
- remoteUrl?: string;
132
- }
133
-
134
- interface Version {
135
- fix: string;
136
- major: string;
137
- minor: string;
138
- version: string;
139
- }
140
-
141
- export interface PlatformVersions {
142
- modules: Record<string, Version>;
143
- web: Version;
144
- widgets: Record<string, Version | null>;
145
- }
@@ -1,5 +0,0 @@
1
- import { atom } from 'jotai';
2
-
3
- import { AdditionalResource } from './types';
4
-
5
- export const additionalResourcesAtom = atom<Array<AdditionalResource>>([]);
@@ -1,7 +0,0 @@
1
- import { atom } from 'jotai';
2
-
3
- import { FederatedModule } from './types';
4
-
5
- export const federatedModulesAtom = atom<Array<FederatedModule> | null>(null);
6
-
7
- export const federatedWidgetsAtom = atom<Array<FederatedModule> | null>(null);
@@ -1,3 +0,0 @@
1
- import { atom } from 'jotai';
2
-
3
- export const isOnPublicPageAtom = atom(false);
@@ -1,5 +0,0 @@
1
- import { atom } from 'jotai';
2
-
3
- import { PlatformVersions } from './types';
4
-
5
- export const platformVersionsAtom = atom<PlatformVersions | null>(null);