sevago-sso-fe 1.0.51 → 1.0.53
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/README.md +191 -256
- package/dist/components/elements/icon/index.d.ts +0 -1
- package/dist/components/elements/index.d.ts +0 -1
- package/dist/index.cjs.js +8 -35
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +9 -36
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/elements/icon/icon-button.element.d.ts +0 -10
- package/dist/components/elements/icon/icon-content.element.d.ts +0 -15
- package/dist/components/elements/radio/radio-group.element.d.ts +0 -16
- package/dist/components/elements/tooltip/index.d.ts +0 -1
- package/dist/components/elements/tooltip/tooltip-on-click.element.d.ts +0 -7
- package/dist/components/elements/tooltip/tooltip-on-hover.element.d.ts +0 -9
package/README.md
CHANGED
|
@@ -1,19 +1,26 @@
|
|
|
1
1
|
# Sevago SSO Frontend Library
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<div align="center">
|
|
4
|
+
|
|
5
|
+
A comprehensive Single Sign-On (SSO) frontend library built with React, TypeScript, and Material-UI.
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/sevago-sso-fe)
|
|
8
|
+
[](https://opensource.org/licenses/MIT)
|
|
9
|
+
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
---
|
|
4
13
|
|
|
5
14
|
## Features
|
|
6
15
|
|
|
7
|
-
- 🔐 Complete authentication system with login, logout, and token management
|
|
8
16
|
- 🎨 Material-UI components with custom styling and theming
|
|
9
17
|
- 📱 Responsive design with mobile support
|
|
10
|
-
-
|
|
11
|
-
- 🌐 API integration with axios
|
|
12
|
-
- 🔔 Real-time notifications with Firebase
|
|
13
|
-
- 📊 Dashboard components and layouts
|
|
14
|
-
- 🎯 TypeScript support with full type definitions
|
|
18
|
+
- 🎯 Full TypeScript support
|
|
15
19
|
- 🎭 Framer Motion animations
|
|
16
|
-
-
|
|
20
|
+
- 📊 System monitoring components
|
|
21
|
+
- 🔧 Utility functions and constants
|
|
22
|
+
|
|
23
|
+
---
|
|
17
24
|
|
|
18
25
|
## Installation
|
|
19
26
|
|
|
@@ -21,15 +28,15 @@ A comprehensive Single Sign-On (SSO) frontend library built with React, TypeScri
|
|
|
21
28
|
npm install sevago-sso-fe
|
|
22
29
|
```
|
|
23
30
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
This library requires the following peer dependencies to be installed in your project:
|
|
31
|
+
### Peer Dependencies
|
|
27
32
|
|
|
28
33
|
```bash
|
|
29
|
-
npm install react
|
|
34
|
+
npm install react@^19.2.0 react-dom@^19.2.0 @emotion/react@>=11 @emotion/styled@>=11 @mui/material@>=5 @mui/system@>=5 @reduxjs/toolkit@^2.9.2 react-redux@^9.2.0 react-router-dom@^7.9.5 redux-persist@^6.0.0
|
|
30
35
|
```
|
|
31
36
|
|
|
32
|
-
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Quick Start
|
|
33
40
|
|
|
34
41
|
### Basic Setup
|
|
35
42
|
|
|
@@ -38,21 +45,14 @@ import React from 'react';
|
|
|
38
45
|
import { Provider } from 'react-redux';
|
|
39
46
|
import { PersistGate } from 'redux-persist/integration/react';
|
|
40
47
|
import { BrowserRouter } from 'react-router-dom';
|
|
41
|
-
import
|
|
42
|
-
App,
|
|
43
|
-
store,
|
|
44
|
-
persistor,
|
|
45
|
-
SnackbarProvider
|
|
46
|
-
} from 'sevago-sso-fe';
|
|
48
|
+
import App from 'sevago-sso-fe';
|
|
47
49
|
|
|
48
50
|
function RootApp() {
|
|
49
51
|
return (
|
|
50
52
|
<Provider store={store}>
|
|
51
53
|
<PersistGate loading={null} persistor={persistor}>
|
|
52
54
|
<BrowserRouter>
|
|
53
|
-
<
|
|
54
|
-
<App />
|
|
55
|
-
</SnackbarProvider>
|
|
55
|
+
<App />
|
|
56
56
|
</BrowserRouter>
|
|
57
57
|
</PersistGate>
|
|
58
58
|
</Provider>
|
|
@@ -62,303 +62,238 @@ function RootApp() {
|
|
|
62
62
|
export default RootApp;
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
---
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
import {
|
|
69
|
-
useSnackbar,
|
|
70
|
-
useApps,
|
|
71
|
-
authApi,
|
|
72
|
-
userApi,
|
|
73
|
-
SystemMonitorScreen,
|
|
74
|
-
DashboardPage,
|
|
75
|
-
AuthPage
|
|
76
|
-
} from 'sevago-sso-fe';
|
|
67
|
+
## Usage
|
|
77
68
|
|
|
78
|
-
|
|
79
|
-
const { showSnackbar } = useSnackbar();
|
|
80
|
-
const { apps } = useApps();
|
|
69
|
+
### Components
|
|
81
70
|
|
|
82
|
-
|
|
83
|
-
try {
|
|
84
|
-
const response = await authApi.login(credentials);
|
|
85
|
-
showSnackbar({ message: 'Login successful!', type: 'success' });
|
|
86
|
-
} catch (error) {
|
|
87
|
-
showSnackbar({ message: 'Login failed!', type: 'error' });
|
|
88
|
-
}
|
|
89
|
-
};
|
|
71
|
+
#### App Component
|
|
90
72
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
</div>
|
|
96
|
-
);
|
|
97
|
-
}
|
|
73
|
+
```tsx
|
|
74
|
+
import App from 'sevago-sso-fe';
|
|
75
|
+
|
|
76
|
+
<App />
|
|
98
77
|
```
|
|
99
78
|
|
|
100
|
-
|
|
79
|
+
#### System Monitor Screen
|
|
101
80
|
|
|
102
81
|
```tsx
|
|
103
|
-
import {
|
|
104
|
-
useSnackbar,
|
|
105
|
-
useApps,
|
|
106
|
-
useVersionCheck,
|
|
107
|
-
useUpdateCurrentAccess,
|
|
108
|
-
useActiveSidebar,
|
|
109
|
-
useAllApps,
|
|
110
|
-
useIsSystemMonitor,
|
|
111
|
-
useSidebarState,
|
|
112
|
-
useTagSelector,
|
|
113
|
-
useSidebar
|
|
114
|
-
} from 'sevago-sso-fe';
|
|
115
|
-
|
|
116
|
-
function MyComponent() {
|
|
117
|
-
const { showSnackbar } = useSnackbar();
|
|
118
|
-
const { apps, loading } = useApps();
|
|
119
|
-
const { updateAccess } = useUpdateCurrentAccess();
|
|
120
|
-
const { isActive } = useActiveSidebar();
|
|
121
|
-
const { allApps } = useAllApps();
|
|
122
|
-
const { isSystemMonitor } = useIsSystemMonitor();
|
|
123
|
-
const { sidebarState } = useSidebarState();
|
|
124
|
-
const { selectedTags, toggleTag } = useTagSelector();
|
|
125
|
-
const { sidebar } = useSidebar();
|
|
126
|
-
|
|
127
|
-
// Version checking
|
|
128
|
-
useVersionCheck({ interval: 5 * 60 * 1000 });
|
|
82
|
+
import { SystemMonitorScreen } from 'sevago-sso-fe';
|
|
129
83
|
|
|
130
|
-
|
|
131
|
-
<div>
|
|
132
|
-
{loading ? 'Loading...' : apps.map(app => (
|
|
133
|
-
<div key={app.id}>{app.name}</div>
|
|
134
|
-
))}
|
|
135
|
-
</div>
|
|
136
|
-
);
|
|
137
|
-
}
|
|
84
|
+
<SystemMonitorScreen />
|
|
138
85
|
```
|
|
139
86
|
|
|
140
|
-
|
|
87
|
+
#### App Grid
|
|
141
88
|
|
|
142
89
|
```tsx
|
|
143
|
-
import {
|
|
90
|
+
import { AppGrid } from 'sevago-sso-fe';
|
|
144
91
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
const logoutResponse = await authApi.logout({ token });
|
|
92
|
+
<AppGrid apps={apps} onAppClick={handleAppClick} loading={loading} />
|
|
93
|
+
```
|
|
148
94
|
|
|
149
|
-
|
|
150
|
-
const user = await userApi.getUser(userId);
|
|
151
|
-
const updatedUser = await userApi.updateAccount(userData);
|
|
95
|
+
#### Sidebar Components
|
|
152
96
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
await notificationApi.subscribeTopic({ token });
|
|
97
|
+
```tsx
|
|
98
|
+
import { AppsSidebar, SystemMonitorSidebarPart } from 'sevago-sso-fe';
|
|
156
99
|
|
|
157
|
-
|
|
158
|
-
|
|
100
|
+
<AppsSidebar />
|
|
101
|
+
<SystemMonitorSidebarPart />
|
|
159
102
|
```
|
|
160
103
|
|
|
161
|
-
|
|
104
|
+
#### UI Elements
|
|
162
105
|
|
|
163
|
-
|
|
164
|
-
|
|
106
|
+
```tsx
|
|
107
|
+
import {
|
|
108
|
+
ImageElement,
|
|
109
|
+
RadioElement,
|
|
110
|
+
TypographyContentCaption,
|
|
111
|
+
MotionBox
|
|
112
|
+
} from 'sevago-sso-fe';
|
|
165
113
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
114
|
+
<ImageElement src="/path/to/image.jpg" alt="Image" />
|
|
115
|
+
<RadioElement value="option1" checked={true} onChange={handleChange} />
|
|
116
|
+
<TypographyContentCaption>Caption text</TypographyContentCaption>
|
|
117
|
+
<MotionBox animate={{ opacity: 1 }}>Animated content</MotionBox>
|
|
118
|
+
```
|
|
171
119
|
|
|
172
|
-
###
|
|
173
|
-
- `SystemMonitorScreen` - System monitoring dashboard screen
|
|
120
|
+
### Constants
|
|
174
121
|
|
|
175
|
-
|
|
176
|
-
- `AuthLayout` - Authentication layout
|
|
177
|
-
- `DashboardLayout` - Dashboard layout
|
|
178
|
-
- `DefaultLayout` - Default layout
|
|
122
|
+
#### Style Constants
|
|
179
123
|
|
|
180
|
-
|
|
124
|
+
```tsx
|
|
125
|
+
import { STYLE, MODE, OPACITY } from 'sevago-sso-fe';
|
|
181
126
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
- `EmptyComponent` - Empty state component
|
|
189
|
-
- `LoadingComponent` - Loading component
|
|
190
|
-
- `LogoComponent` - Logo component
|
|
191
|
-
- `MotionBox` - Framer Motion box component
|
|
192
|
-
- `TimeAgoContentComponent` - Time ago content
|
|
193
|
-
- `TimeAgoComponent` - Time ago component
|
|
127
|
+
const customStyle = {
|
|
128
|
+
padding: STYLE.PADDING_GAP_LAYOUT,
|
|
129
|
+
borderRadius: STYLE.BORDER_RADIUS_ELEMENT,
|
|
130
|
+
height: STYLE.HEIGHT_DEFAULT_TEXT_FIELD_BUTTON,
|
|
131
|
+
};
|
|
132
|
+
```
|
|
194
133
|
|
|
195
|
-
####
|
|
196
|
-
- `ButtonElement` - Custom button element
|
|
197
|
-
- `IconElement` - Icon element
|
|
198
|
-
- `ImageElement` - Image element
|
|
199
|
-
- `RadioElement` - Radio button element
|
|
200
|
-
- `TextFieldElement` - Text field element
|
|
201
|
-
- `TooltipOnClickElement` - Tooltip on click element
|
|
202
|
-
- `TypographyContentCaption` - Typography caption
|
|
203
|
-
|
|
204
|
-
### Hooks
|
|
205
|
-
- `useSnackbar()` - Snackbar notifications with SnackbarProvider
|
|
206
|
-
- `useApps()` - Application management
|
|
207
|
-
- `useActiveSidebar()` - Active sidebar state
|
|
208
|
-
- `useAllApps()` - All applications access
|
|
209
|
-
- `useIsSystemMonitor()` - System monitor check
|
|
210
|
-
- `useSidebarState()` - Sidebar state management
|
|
211
|
-
- `useTagSelector()` - Tag selection functionality
|
|
212
|
-
- `useUpdateCurrentAccess()` - Access control updates
|
|
213
|
-
- `useVersionCheck(options)` - Version checking
|
|
214
|
-
- `useSidebar()` - Sidebar management
|
|
215
|
-
|
|
216
|
-
### API Services
|
|
217
|
-
- `authApi` - Authentication operations (login, logout, refresh token, etc.)
|
|
218
|
-
- `userApi` - User management (get user, update account, etc.)
|
|
219
|
-
- `notificationApi` - Notification handling (get notifications, subscribe topics, etc.)
|
|
220
|
-
- `orgUnitApi` - Organization unit management
|
|
221
|
-
|
|
222
|
-
### Redux Store
|
|
223
|
-
- `store` - Redux store instance
|
|
224
|
-
- `persistor` - Redux persist instance
|
|
225
|
-
- `GlobalReduxState` - Global Redux state type
|
|
226
|
-
|
|
227
|
-
#### Redux Slices
|
|
228
|
-
- `remainingWeightSlice` - Remaining weight management
|
|
229
|
-
- `account` - Account management (login, logout, reset password, refresh token, subscribe topic, unsubscribe topic, change notification count, change sidebar count, update account, get account, update position org unit, update current access)
|
|
230
|
-
- `system` - System management (change mode, theme management)
|
|
231
|
-
|
|
232
|
-
### Router Utilities
|
|
233
|
-
- `renderRoutes` - Route rendering utility
|
|
234
|
-
- `routes` - Route definitions
|
|
235
|
-
- `routeConstants` - Route constants (ALLOW_USER_TYPES, BOOKING_SCREEN, DASHBOARD_SCREEN, etc.)
|
|
236
|
-
- `RouteType` - Route type enum
|
|
237
|
-
|
|
238
|
-
### Common Utilities
|
|
239
|
-
|
|
240
|
-
#### Constants
|
|
241
|
-
- `STYLE` - Style constants (padding, border radius, heights, etc.)
|
|
242
|
-
- `MODE` - Theme modes (light, dark, other)
|
|
243
|
-
- `OPACITY` - Opacity constants
|
|
244
|
-
- `APPS_CONSTANT` - Application constants
|
|
245
|
-
- `REG_EXP` - Regular expression constants
|
|
246
|
-
- `TYPOGRAPHY` - Typography constants
|
|
247
|
-
|
|
248
|
-
#### Utils
|
|
249
|
-
- `timeUtils` - Time utility functions (getTimeAgo, getDateTime, getDate, checkNowYear, getMonthRangeForYear, getDayOffsetPx, isSameDateTime, getTimeDate, isDateString)
|
|
250
|
-
- `stringUtils` - String utility functions
|
|
251
|
-
- `findCurrentAccessHelper` - Access control helper
|
|
252
|
-
- `otherUtils` - Other utility functions
|
|
253
|
-
|
|
254
|
-
#### Configuration
|
|
255
|
-
- `axiosConfig` - Axios configuration
|
|
256
|
-
- `firebaseConfig` - Firebase configuration
|
|
257
|
-
- `socketConfig` - Socket.io configuration
|
|
258
|
-
|
|
259
|
-
## Configuration
|
|
260
|
-
|
|
261
|
-
### Firebase Setup
|
|
262
|
-
Configure Firebase for notifications:
|
|
134
|
+
#### Theme Modes
|
|
263
135
|
|
|
264
136
|
```tsx
|
|
265
|
-
import {
|
|
266
|
-
|
|
267
|
-
const firebaseConfig = {
|
|
268
|
-
// Your Firebase config
|
|
269
|
-
apiKey: "your-api-key",
|
|
270
|
-
authDomain: "your-auth-domain",
|
|
271
|
-
projectId: "your-project-id",
|
|
272
|
-
storageBucket: "your-storage-bucket",
|
|
273
|
-
messagingSenderId: "your-sender-id",
|
|
274
|
-
appId: "your-app-id"
|
|
275
|
-
};
|
|
137
|
+
import { MODE } from 'sevago-sso-fe';
|
|
138
|
+
import { createTheme } from '@mui/material/styles';
|
|
276
139
|
|
|
277
|
-
|
|
140
|
+
const theme = createTheme(MODE.light); // or MODE.dark or MODE.other
|
|
278
141
|
```
|
|
279
142
|
|
|
280
|
-
|
|
281
|
-
Configure your API endpoints:
|
|
143
|
+
#### Opacity Constants
|
|
282
144
|
|
|
283
145
|
```tsx
|
|
284
|
-
import {
|
|
146
|
+
import { MODE, OPACITY } from 'sevago-sso-fe';
|
|
285
147
|
|
|
286
|
-
|
|
287
|
-
axiosRequest.defaults.baseURL = 'https://your-api.com';
|
|
148
|
+
const semiTransparent = `${MODE.light.palette.primary.main}${OPACITY[50]}`;
|
|
288
149
|
```
|
|
289
150
|
|
|
290
|
-
###
|
|
291
|
-
|
|
151
|
+
### Utilities
|
|
152
|
+
|
|
153
|
+
#### Time Utils
|
|
292
154
|
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
|
|
155
|
+
```tsx
|
|
156
|
+
import { timeUtils } from 'sevago-sso-fe';
|
|
157
|
+
|
|
158
|
+
const timeAgo = timeUtils.getTimeAgo(new Date());
|
|
159
|
+
const dateTime = timeUtils.getDateTime(new Date());
|
|
160
|
+
const date = timeUtils.getDate(new Date());
|
|
296
161
|
```
|
|
297
162
|
|
|
298
|
-
|
|
163
|
+
#### String Utils
|
|
299
164
|
|
|
300
|
-
|
|
165
|
+
```tsx
|
|
166
|
+
import { stringUtils } from 'sevago-sso-fe';
|
|
167
|
+
|
|
168
|
+
// Use string utility functions
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
#### App Utils
|
|
301
172
|
|
|
302
173
|
```tsx
|
|
303
|
-
import {
|
|
174
|
+
import { appUtils } from 'sevago-sso-fe';
|
|
304
175
|
|
|
305
|
-
// Use
|
|
306
|
-
|
|
307
|
-
padding: STYLE.PADDING_GAP_LAYOUT,
|
|
308
|
-
borderRadius: STYLE.BORDER_RADIUS_ELEMENT,
|
|
309
|
-
height: STYLE.HEIGHT_DEFAULT_TEXT_FIELD_BUTTON,
|
|
310
|
-
};
|
|
176
|
+
// Use app utility functions
|
|
177
|
+
```
|
|
311
178
|
|
|
312
|
-
|
|
313
|
-
const theme = createTheme(MODE.light); // or MODE.dark or MODE.other
|
|
179
|
+
### Enums
|
|
314
180
|
|
|
315
|
-
|
|
316
|
-
|
|
181
|
+
```tsx
|
|
182
|
+
import { AppCategory, Mode, OrderType } from 'sevago-sso-fe';
|
|
183
|
+
|
|
184
|
+
// Use enums
|
|
185
|
+
const category = AppCategory.ALL;
|
|
186
|
+
const mode = Mode.LIGHT;
|
|
187
|
+
const order = OrderType.ASC;
|
|
317
188
|
```
|
|
318
189
|
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## API Reference
|
|
193
|
+
|
|
194
|
+
### Components
|
|
195
|
+
|
|
196
|
+
| Component | Description | Props |
|
|
197
|
+
|-----------|-------------|-------|
|
|
198
|
+
| `App` | Main application component with theme provider | None |
|
|
199
|
+
| `SystemMonitorScreen` | System monitoring dashboard screen | - |
|
|
200
|
+
| `AppGrid` | Application grid component | `apps`, `onAppClick`, `loading` |
|
|
201
|
+
| `AppsSidebar` | Applications sidebar component | - |
|
|
202
|
+
| `SystemMonitorSidebarPart` | System monitor sidebar part | - |
|
|
203
|
+
| `ImageElement` | Image element | `src`, `alt`, `width`, `height` |
|
|
204
|
+
| `RadioElement` | Radio button element | `value`, `checked`, `onChange` |
|
|
205
|
+
| `TypographyContentCaption` | Typography caption component | `children`, `variant`, `color` |
|
|
206
|
+
| `MotionBox` | Framer Motion animated box | `animate`, `transition`, `children` |
|
|
207
|
+
|
|
208
|
+
### Constants
|
|
209
|
+
|
|
210
|
+
- **`STYLE`** - Style constants (padding, border radius, heights, etc.)
|
|
211
|
+
- **`MODE`** - Theme modes (light, dark, other)
|
|
212
|
+
- **`OPACITY`** - Opacity constants (0-100)
|
|
213
|
+
- **`REG_EXP`** - Regular expression constants
|
|
214
|
+
- **`TYPOGRAPHY`** - Typography constants
|
|
215
|
+
|
|
216
|
+
### Utilities
|
|
217
|
+
|
|
218
|
+
- **`timeUtils`** - Time utility functions
|
|
219
|
+
- `getTimeAgo(date)`
|
|
220
|
+
- `getDateTime(date)`
|
|
221
|
+
- `getDate(date)`
|
|
222
|
+
- `checkNowYear(date)`
|
|
223
|
+
- `getMonthRangeForYear(year)`
|
|
224
|
+
- `getDayOffsetPx(day)`
|
|
225
|
+
- `isSameDateTime(date1, date2)`
|
|
226
|
+
- `getTimeDate(date)`
|
|
227
|
+
- `isDateString(str)`
|
|
228
|
+
|
|
229
|
+
- **`stringUtils`** - String utility functions
|
|
230
|
+
- **`appUtils`** - Application utility functions
|
|
231
|
+
- **`getLimitLineCss`** - CSS utility for limiting lines
|
|
232
|
+
|
|
233
|
+
### Enums
|
|
234
|
+
|
|
235
|
+
- **`AppCategory`** - Application category enum
|
|
236
|
+
- **`Mode`** - Theme mode enum
|
|
237
|
+
- **`OrderType`** - Order type enum
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
319
241
|
## TypeScript Support
|
|
320
242
|
|
|
321
|
-
Full TypeScript support
|
|
243
|
+
Full TypeScript support with comprehensive type definitions:
|
|
322
244
|
|
|
323
245
|
```tsx
|
|
324
246
|
import type {
|
|
325
|
-
|
|
326
|
-
LoginDto,
|
|
327
|
-
User,
|
|
328
|
-
Notification,
|
|
329
|
-
SnackbarType,
|
|
330
|
-
RouteType
|
|
247
|
+
// Add your types here based on actual exports
|
|
331
248
|
} from 'sevago-sso-fe';
|
|
332
249
|
```
|
|
333
250
|
|
|
251
|
+
---
|
|
252
|
+
|
|
334
253
|
## Development
|
|
335
254
|
|
|
336
|
-
|
|
255
|
+
### Prerequisites
|
|
337
256
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
3. Run development server: `npm run dev`
|
|
341
|
-
4. Build library: `npm run build:lib`
|
|
342
|
-
5. Test the build: `npm run preview`
|
|
343
|
-
6. Lint code: `npm run lint`
|
|
257
|
+
- Node.js >= 16.x
|
|
258
|
+
- npm >= 7.x
|
|
344
259
|
|
|
345
|
-
|
|
260
|
+
### Getting Started
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
# Clone the repository
|
|
264
|
+
git clone https://github.com/dev1-gmail2025/sevago-sso-fe.git
|
|
265
|
+
cd sevago-sso-fe
|
|
346
266
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
267
|
+
# Install dependencies
|
|
268
|
+
npm install
|
|
269
|
+
|
|
270
|
+
# Run development server
|
|
271
|
+
npm run dev
|
|
272
|
+
|
|
273
|
+
# Build library
|
|
274
|
+
npm run build:lib
|
|
275
|
+
|
|
276
|
+
# Lint code
|
|
277
|
+
npm run lint
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
---
|
|
356
281
|
|
|
357
282
|
## License
|
|
358
283
|
|
|
359
284
|
MIT
|
|
360
285
|
|
|
361
|
-
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
## Support
|
|
289
|
+
|
|
290
|
+
- **GitHub Issues:** [https://github.com/dev1-gmail2025/sevago-sso-fe/issues](https://github.com/dev1-gmail2025/sevago-sso-fe/issues)
|
|
291
|
+
- **Repository:** [https://github.com/dev1-gmail2025/sevago-sso-fe](https://github.com/dev1-gmail2025/sevago-sso-fe)
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
<div align="center">
|
|
296
|
+
|
|
297
|
+
**Made with ❤️ for the Sevago SSO ecosystem**
|
|
362
298
|
|
|
363
|
-
|
|
364
|
-
- Issues: https://github.com/dev1-gmail2025/sevago-sso-fe/issues
|
|
299
|
+
</div>
|
package/dist/index.cjs.js
CHANGED
|
@@ -13768,10 +13768,12 @@ const AppGrid = ({
|
|
|
13768
13768
|
gap: gap2
|
|
13769
13769
|
},
|
|
13770
13770
|
children: visibleApps.map((app, index) => {
|
|
13771
|
+
const appUrl = app.path[env];
|
|
13772
|
+
const absoluteUrl = appUrl.startsWith("https://") ? appUrl : `${window.location.origin}${appUrl.startsWith("/") ? appUrl : `/${appUrl}`}`;
|
|
13771
13773
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13772
13774
|
"a",
|
|
13773
13775
|
{
|
|
13774
|
-
href:
|
|
13776
|
+
href: absoluteUrl,
|
|
13775
13777
|
target: "_blank",
|
|
13776
13778
|
rel: "noopener noreferrer",
|
|
13777
13779
|
style: {
|
|
@@ -14095,36 +14097,6 @@ const RadioElement = ({ name, label, ...rest }) => {
|
|
|
14095
14097
|
}
|
|
14096
14098
|
);
|
|
14097
14099
|
};
|
|
14098
|
-
const TooltipOnClickElement = ({
|
|
14099
|
-
open,
|
|
14100
|
-
placement = "top",
|
|
14101
|
-
content,
|
|
14102
|
-
children,
|
|
14103
|
-
onOpen,
|
|
14104
|
-
onClose,
|
|
14105
|
-
onClickAway,
|
|
14106
|
-
...rest
|
|
14107
|
-
}) => {
|
|
14108
|
-
return (
|
|
14109
|
-
// Chỗ này có thể là bug, onClickAway apply ngay cả khi component chưa được render
|
|
14110
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.ClickAwayListener, { onClickAway, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14111
|
-
material.Tooltip,
|
|
14112
|
-
{
|
|
14113
|
-
PopperProps: { disablePortal: true },
|
|
14114
|
-
open,
|
|
14115
|
-
onOpen,
|
|
14116
|
-
onClose,
|
|
14117
|
-
disableFocusListener: true,
|
|
14118
|
-
disableHoverListener: true,
|
|
14119
|
-
disableTouchListener: true,
|
|
14120
|
-
placement,
|
|
14121
|
-
title: content,
|
|
14122
|
-
...rest,
|
|
14123
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("span", { children })
|
|
14124
|
-
}
|
|
14125
|
-
) })
|
|
14126
|
-
);
|
|
14127
|
-
};
|
|
14128
14100
|
const TypographyContentCaption = ({ content, caption, sx = {}, sxContent, sxCaption }) => {
|
|
14129
14101
|
return /* @__PURE__ */ jsxRuntime.jsxs(material.Stack, { gap: 0, sx: { ...sx }, children: [
|
|
14130
14102
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -14234,9 +14206,11 @@ const SystemMonitorScreen = ({
|
|
|
14234
14206
|
/* @__PURE__ */ jsxRuntime.jsx(MotionBox, { preset: "tabContent", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14235
14207
|
AppGrid,
|
|
14236
14208
|
{
|
|
14237
|
-
apps: Object.values(APP_OBJ).filter(
|
|
14238
|
-
|
|
14239
|
-
|
|
14209
|
+
apps: Object.values(APP_OBJ).filter((e) => {
|
|
14210
|
+
const isBlacklisted = !!blacklist?.includes(e.path[env]);
|
|
14211
|
+
const isInSelectedGroup = tab === AppGroup.ALL ? true : e.group === tab;
|
|
14212
|
+
return !isBlacklisted && isInSelectedGroup;
|
|
14213
|
+
}),
|
|
14240
14214
|
iconSize: 80,
|
|
14241
14215
|
iconRadius: 7,
|
|
14242
14216
|
gap: PADDING_GAP_TAB,
|
|
@@ -14297,7 +14271,6 @@ exports.StyledTableCell = StyledTableCell;
|
|
|
14297
14271
|
exports.SystemMonitorScreen = SystemMonitorScreen;
|
|
14298
14272
|
exports.SystemMonitorSidebarPart = SystemMonitorSidebarPart;
|
|
14299
14273
|
exports.TYPOGRAPHY_STYLES = TYPOGRAPHY_STYLES;
|
|
14300
|
-
exports.TooltipOnClickElement = TooltipOnClickElement;
|
|
14301
14274
|
exports.TypographyContentCaption = TypographyContentCaption;
|
|
14302
14275
|
exports.TypographyFilter = TypographyFilter;
|
|
14303
14276
|
exports.checkNowYear = checkNowYear;
|