@campxdev/campx-web-utils 1.4.1 → 2.0.0-alpha.2
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/dist/cjs/index.js +1 -1
- package/dist/cjs/types/src/context/Providers.d.ts +1 -2
- package/dist/cjs/types/src/index.d.ts +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/types/src/context/Providers.d.ts +1 -2
- package/dist/esm/types/src/index.d.ts +1 -1
- package/dist/index.d.ts +5 -51
- package/dist/styles.css +5355 -0
- package/export.ts +0 -3
- package/package.json +12 -12
- package/src/AppContent.tsx +1 -15
- package/src/context/ErrorBoundary/ErrorBoundary.tsx +11 -37
- package/src/context/ErrorBoundary/Login.tsx +58 -67
- package/src/context/Providers.tsx +3 -12
- package/src/index.tsx +1 -1
- package/src/routes/main.tsx +5 -4
- package/src/styles/index.css +4 -0
- package/types/prettier.d.ts +2 -0
- package/dist/cjs/types/src/components/ActivityLog.d.ts +0 -13
- package/dist/cjs/types/src/components/ChangePassword.d.ts +0 -9
- package/dist/cjs/types/src/layout/AppLayout/AppLayout.d.ts +0 -23
- package/dist/cjs/types/src/layout/AppLayout/components/HelpDocs.d.ts +0 -11
- package/dist/esm/types/src/components/ActivityLog.d.ts +0 -13
- package/dist/esm/types/src/components/ChangePassword.d.ts +0 -9
- package/dist/esm/types/src/layout/AppLayout/AppLayout.d.ts +0 -23
- package/dist/esm/types/src/layout/AppLayout/components/HelpDocs.d.ts +0 -11
- package/dist/types/theme.d.ts +0 -63
- package/src/App.css +0 -38
- package/src/components/ActivityLog.tsx +0 -96
- package/src/components/ChangePassword.tsx +0 -183
- package/src/index.css +0 -13
- package/src/layout/AppLayout/AppLayout.tsx +0 -155
- package/src/layout/AppLayout/components/HelpDocs.tsx +0 -121
package/export.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
export * from './src/components/ChangePassword';
|
|
2
1
|
export * from './src/config';
|
|
3
2
|
export * from './src/context/export';
|
|
4
3
|
export * from './src/hooks/export';
|
|
5
|
-
export * from './src/layout/AppLayout/AppLayout';
|
|
6
|
-
export * from './src/layout/AppLayout/components/HelpDocs';
|
|
7
4
|
export * from './src/selectors/export';
|
|
8
5
|
export * from './src/utils/constants';
|
|
9
6
|
export * from './src/utils/openInNewTab';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@campxdev/campx-web-utils",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha.2",
|
|
4
4
|
"author": "CampX",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -13,32 +13,28 @@
|
|
|
13
13
|
"main": "dist/cjs/index.js",
|
|
14
14
|
"module": "dist/esm/index.js",
|
|
15
15
|
"types": "dist/index.d.ts",
|
|
16
|
+
"style": "dist/styles.css",
|
|
16
17
|
"files": [
|
|
17
18
|
"dist",
|
|
18
19
|
"src",
|
|
19
|
-
"export.ts"
|
|
20
|
+
"export.ts",
|
|
21
|
+
"types"
|
|
20
22
|
],
|
|
21
23
|
"private": false,
|
|
22
24
|
"peerDependencies": {
|
|
23
25
|
"@campxdev/react-blueprint": ">=2.3.11",
|
|
24
|
-
"@emotion/react": "^11.14.0",
|
|
25
|
-
"@emotion/styled": "^11.14.0",
|
|
26
|
-
"@mui/icons-material": "^7.0.2",
|
|
27
|
-
"@mui/material": "^7.0.2",
|
|
28
|
-
"@mui/x-data-grid": "^8.1.0",
|
|
29
|
-
"@mui/x-date-pickers": "^8.1.0",
|
|
30
26
|
"react-redux": "=>9.1.2",
|
|
31
27
|
"react-router-dom": "^6.24.0"
|
|
32
28
|
},
|
|
33
29
|
"dependencies": {
|
|
34
|
-
"@campxdev/react-blueprint": "
|
|
30
|
+
"@campxdev/react-blueprint": "3.0.0-alpha.8",
|
|
35
31
|
"@hookform/resolvers": "^2.9.10",
|
|
36
|
-
"@mui/x-date-pickers": "^8.1.0",
|
|
37
32
|
"axios": "^1.7.2",
|
|
38
33
|
"cookie-js": "^0.0.1",
|
|
39
34
|
"date-fns": "^4.1.0",
|
|
40
35
|
"device-detector-js": "^3.0.3",
|
|
41
36
|
"framer-motion": "^11.3.21",
|
|
37
|
+
"lucide-react": "^0.553.0",
|
|
42
38
|
"pullstate": "^1.25.0",
|
|
43
39
|
"react": "^18.3.1",
|
|
44
40
|
"react-dom": "^18.3.1",
|
|
@@ -65,6 +61,7 @@
|
|
|
65
61
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
66
62
|
"@rollup/plugin-url": "^8.0.2",
|
|
67
63
|
"@svgr/rollup": "^8.1.0",
|
|
64
|
+
"@tailwindcss/postcss": "^4.1.17",
|
|
68
65
|
"@testing-library/jest-dom": "^5.14.1",
|
|
69
66
|
"@testing-library/react": "^13.0.0",
|
|
70
67
|
"@testing-library/user-event": "^13.2.1",
|
|
@@ -82,20 +79,23 @@
|
|
|
82
79
|
"@types/react-dom": "^18.3.0",
|
|
83
80
|
"@types/react-query": "^1.2.9",
|
|
84
81
|
"@types/react-router-dom": "^5.3.3",
|
|
82
|
+
"postcss-import": "^16.1.1",
|
|
85
83
|
"rollup": "^4.10.0",
|
|
86
84
|
"rollup-plugin-copy": "^3.5.0",
|
|
87
85
|
"rollup-plugin-delete": "^2.0.0",
|
|
88
86
|
"rollup-plugin-dts": "^6.2.1",
|
|
89
87
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
90
88
|
"rollup-plugin-postcss": "^4.0.2",
|
|
91
|
-
"rollup-plugin-
|
|
89
|
+
"rollup-plugin-tsconfig-paths": "^1.5.2",
|
|
90
|
+
"rollup-plugin-visualizer": "^5.12.0",
|
|
91
|
+
"tailwindcss": "^4.1.17"
|
|
92
92
|
},
|
|
93
93
|
"scripts": {
|
|
94
94
|
"start": "craco start",
|
|
95
95
|
"test": "craco test",
|
|
96
96
|
"yalc:w": "copy package.json package.json.backup && node -e \"const fs=require('fs'); const pkg=JSON.parse(fs.readFileSync('./package.json')); pkg.main='export.ts'; pkg.module='export.ts'; pkg.types='export.ts'; pkg.exports={'.':'./export.ts'}; delete pkg.scripts.prepare; fs.writeFileSync('./package.json', JSON.stringify(pkg, null, 2));\" && yalc publish --push --sig --no-scripts && move /Y package.json.backup package.json",
|
|
97
97
|
"eject": "react-scripts eject",
|
|
98
|
-
"build": "rollup -c --bundleConfigAsCjs",
|
|
98
|
+
"build": "NODE_OPTIONS='--max-old-space-size=4096' rollup -c --bundleConfigAsCjs",
|
|
99
99
|
"yalc:dev": "cp package.json package.json.backup && node -e \"const fs=require('fs'); const pkg=JSON.parse(fs.readFileSync('./package.json')); pkg.main='export.ts'; pkg.module='export.ts'; pkg.types='export.ts'; pkg.exports={'.':'./export.ts'}; delete pkg.scripts.prepare; fs.writeFileSync('./package.json', JSON.stringify(pkg, null, 2));\" && yalc publish --push --sig --no-scripts && mv package.json.backup package.json",
|
|
100
100
|
"prepare": "npm run build"
|
|
101
101
|
},
|
package/src/AppContent.tsx
CHANGED
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
import { Breadcrumbs, Icons, TextField } from '@campxdev/react-blueprint';
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import { CourseSelector } from './selectors/CourseSelector';
|
|
4
|
-
|
|
5
1
|
function AppContent() {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return (
|
|
9
|
-
<>
|
|
10
|
-
<Breadcrumbs pathTrimCount={0} />
|
|
11
|
-
<TextField label="habdkhabs" />
|
|
12
|
-
<Icons.AppsIcon />
|
|
13
|
-
|
|
14
|
-
<CourseSelector onChange={() => {}} />
|
|
15
|
-
</>
|
|
16
|
-
);
|
|
2
|
+
return <>Hello</>;
|
|
17
3
|
}
|
|
18
4
|
|
|
19
5
|
export default AppContent;
|
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
ResourceNotFound,
|
|
7
7
|
UnAuthorized,
|
|
8
8
|
} from '@campxdev/react-blueprint';
|
|
9
|
-
import { Alert, Box, styled } from '@mui/material';
|
|
10
9
|
import Cookies from 'js-cookie';
|
|
11
10
|
import { ReactNode, useState } from 'react';
|
|
12
11
|
import { ErrorBoundary as ReactErrorBoundary } from 'react-error-boundary';
|
|
@@ -20,26 +19,6 @@ export type ErrorBoundaryProps = {
|
|
|
20
19
|
children: ReactNode;
|
|
21
20
|
};
|
|
22
21
|
|
|
23
|
-
const StyledAlert = styled(Alert)(({ theme }) => ({
|
|
24
|
-
height: '60px',
|
|
25
|
-
border: `1px solid ${theme.palette.error.main}`,
|
|
26
|
-
display: 'flex',
|
|
27
|
-
alignItems: 'center',
|
|
28
|
-
'& .MuiAlert-message': {
|
|
29
|
-
padding: 0,
|
|
30
|
-
},
|
|
31
|
-
'& .MuiTypography-root': {
|
|
32
|
-
margin: 0,
|
|
33
|
-
},
|
|
34
|
-
position: 'relative',
|
|
35
|
-
'& .retryBtn': {
|
|
36
|
-
color: '#661B2A',
|
|
37
|
-
position: 'absolute',
|
|
38
|
-
right: 8,
|
|
39
|
-
top: 8,
|
|
40
|
-
},
|
|
41
|
-
}));
|
|
42
|
-
|
|
43
22
|
export const ErrorBoundary = (props: ErrorBoundaryProps) => {
|
|
44
23
|
const location = useLocation();
|
|
45
24
|
return (
|
|
@@ -75,20 +54,21 @@ const ErrorFallback = ({ error, resetErrorBoundary }: any) => {
|
|
|
75
54
|
}
|
|
76
55
|
|
|
77
56
|
return (
|
|
78
|
-
<
|
|
79
|
-
<
|
|
80
|
-
|
|
57
|
+
<div className="mt-4 p-5">
|
|
58
|
+
<div className="relative h-15 border border-red-200 bg-red-50 flex items-center rounded-md px-2">
|
|
59
|
+
<div className="flex-1 text-red-700 bg-transparent">
|
|
60
|
+
{error?.response?.data?.message ?? error?.message}
|
|
61
|
+
</div>
|
|
81
62
|
<Button
|
|
82
|
-
className="retryBtn"
|
|
83
63
|
onClick={() => resetErrorBoundary()}
|
|
84
|
-
size="
|
|
85
|
-
|
|
86
|
-
|
|
64
|
+
size="sm"
|
|
65
|
+
variant="link"
|
|
66
|
+
className="hover:no-underline text-destructive"
|
|
87
67
|
>
|
|
88
68
|
Try Again
|
|
89
69
|
</Button>
|
|
90
|
-
</
|
|
91
|
-
</
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
92
72
|
);
|
|
93
73
|
};
|
|
94
74
|
|
|
@@ -114,13 +94,7 @@ const UnAuth = () => {
|
|
|
114
94
|
<UnAuthorized
|
|
115
95
|
component={
|
|
116
96
|
<>
|
|
117
|
-
<Button
|
|
118
|
-
sx={{
|
|
119
|
-
marginTop: '20px',
|
|
120
|
-
}}
|
|
121
|
-
variant="contained"
|
|
122
|
-
onClick={handleLoginClick}
|
|
123
|
-
>
|
|
97
|
+
<Button className="mt-5" variant="default" onClick={handleLoginClick}>
|
|
124
98
|
Click Here To Login
|
|
125
99
|
</Button>
|
|
126
100
|
<Dialog
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Button,
|
|
3
|
+
Icons,
|
|
4
|
+
PasswordField,
|
|
5
|
+
TextField,
|
|
6
|
+
} from '@campxdev/react-blueprint';
|
|
2
7
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
3
|
-
import { Box, Stack } from '@mui/material';
|
|
4
8
|
import DeviceDetector from 'device-detector-js';
|
|
5
9
|
import Cookies from 'js-cookie';
|
|
6
10
|
import { useEffect, useState } from 'react';
|
|
@@ -141,70 +145,57 @@ export const Login = ({ close }: { close: () => void }) => {
|
|
|
141
145
|
};
|
|
142
146
|
|
|
143
147
|
return (
|
|
144
|
-
|
|
145
|
-
<
|
|
146
|
-
<
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
<
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
variant="contained"
|
|
197
|
-
sx={{
|
|
198
|
-
width: '400px',
|
|
199
|
-
}}
|
|
200
|
-
onClick={handleSubmit(onSubmit)}
|
|
201
|
-
disabled={isLoading}
|
|
202
|
-
loading={isLoading}
|
|
203
|
-
>
|
|
204
|
-
Login
|
|
205
|
-
</Button>
|
|
206
|
-
</Stack>
|
|
207
|
-
</Stack>
|
|
208
|
-
</>
|
|
148
|
+
<div className="flex flex-col gap-8 justify-center items-center p-8">
|
|
149
|
+
<div className="flex items-center justify-center h-9 w-48">
|
|
150
|
+
<Icons.CampxFullLogoIcon />
|
|
151
|
+
</div>
|
|
152
|
+
<div className="flex flex-col gap-4 w-full max-w-[400px]">
|
|
153
|
+
<Controller
|
|
154
|
+
control={control}
|
|
155
|
+
render={({ field }: { field: any }) => {
|
|
156
|
+
return (
|
|
157
|
+
<TextField
|
|
158
|
+
name="username"
|
|
159
|
+
placeholder="Enter Username or Email"
|
|
160
|
+
onChange={field.onChange}
|
|
161
|
+
label="Username or Email"
|
|
162
|
+
error={!!errors.username}
|
|
163
|
+
required
|
|
164
|
+
fullWidth
|
|
165
|
+
/>
|
|
166
|
+
);
|
|
167
|
+
}}
|
|
168
|
+
name="username"
|
|
169
|
+
/>
|
|
170
|
+
<Controller
|
|
171
|
+
control={control}
|
|
172
|
+
render={({ field }: { field: any }) => {
|
|
173
|
+
return (
|
|
174
|
+
<PasswordField
|
|
175
|
+
name="password"
|
|
176
|
+
placeholder="Enter password"
|
|
177
|
+
onChange={field.onChange}
|
|
178
|
+
label="Password"
|
|
179
|
+
error={!!errors.password}
|
|
180
|
+
required
|
|
181
|
+
fullWidth
|
|
182
|
+
/>
|
|
183
|
+
);
|
|
184
|
+
}}
|
|
185
|
+
name="password"
|
|
186
|
+
/>
|
|
187
|
+
<Button
|
|
188
|
+
type="submit"
|
|
189
|
+
color="primary"
|
|
190
|
+
variant="default"
|
|
191
|
+
onClick={handleSubmit(onSubmit)}
|
|
192
|
+
disabled={isLoading}
|
|
193
|
+
loading={isLoading}
|
|
194
|
+
fullWidth
|
|
195
|
+
>
|
|
196
|
+
Login
|
|
197
|
+
</Button>
|
|
198
|
+
</div>
|
|
199
|
+
</div>
|
|
209
200
|
);
|
|
210
201
|
};
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { lightTheme, MuiThemeProvider } from '@campxdev/react-blueprint';
|
|
2
|
-
import { LocalizationProvider } from '@mui/x-date-pickers';
|
|
3
|
-
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
|
|
4
1
|
import {
|
|
5
2
|
combineReducers,
|
|
6
3
|
configureStore,
|
|
@@ -20,12 +17,10 @@ export { BrowserRouter } from 'react-router-dom';
|
|
|
20
17
|
export const Providers = ({
|
|
21
18
|
children,
|
|
22
19
|
basename,
|
|
23
|
-
theme = lightTheme,
|
|
24
20
|
reducers = {},
|
|
25
21
|
}: {
|
|
26
22
|
children: ReactNode;
|
|
27
23
|
basename?: string;
|
|
28
|
-
theme?: any;
|
|
29
24
|
reducers?: ReducersMapObject;
|
|
30
25
|
}) => {
|
|
31
26
|
const queryClient = new QueryClient({
|
|
@@ -62,13 +57,9 @@ export const Providers = ({
|
|
|
62
57
|
<Provider store={store}>
|
|
63
58
|
<BrowserRouter basename={basename ?? baseName}>
|
|
64
59
|
<QueryClientProvider client={queryClient}>
|
|
65
|
-
<
|
|
66
|
-
<
|
|
67
|
-
|
|
68
|
-
<ConfirmDialogProvider>{children}</ConfirmDialogProvider>
|
|
69
|
-
</LocalizationProvider>
|
|
70
|
-
</SnackbarProvider>
|
|
71
|
-
</MuiThemeProvider>
|
|
60
|
+
<SnackbarProvider>
|
|
61
|
+
<ConfirmDialogProvider>{children}</ConfirmDialogProvider>
|
|
62
|
+
</SnackbarProvider>
|
|
72
63
|
</QueryClientProvider>
|
|
73
64
|
</BrowserRouter>
|
|
74
65
|
</Provider>
|
package/src/index.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import ReactDOM from 'react-dom/client';
|
|
3
3
|
import App from './App';
|
|
4
|
-
import './index.css';
|
|
5
4
|
import reportWebVitals from './reportWebVitals';
|
|
5
|
+
import './styles/index.css';
|
|
6
6
|
|
|
7
7
|
const root = ReactDOM.createRoot(
|
|
8
8
|
document.getElementById('root') as HTMLElement,
|
package/src/routes/main.tsx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { AppLayout
|
|
1
|
+
import { AppLayout } from '@campxdev/react-blueprint';
|
|
2
|
+
import { ShieldUser } from 'lucide-react';
|
|
2
3
|
import { Navigate, Outlet } from 'react-router-dom';
|
|
3
4
|
import AppContent from '../AppContent';
|
|
4
5
|
|
|
@@ -19,7 +20,7 @@ export const mainRoutes = [
|
|
|
19
20
|
{
|
|
20
21
|
name: 'App Content',
|
|
21
22
|
path: '/app-content',
|
|
22
|
-
icon: <
|
|
23
|
+
icon: <ShieldUser size={20} />,
|
|
23
24
|
},
|
|
24
25
|
]}
|
|
25
26
|
userProfileParams={userProfileParams}
|
|
@@ -30,10 +31,10 @@ export const mainRoutes = [
|
|
|
30
31
|
children: [
|
|
31
32
|
{
|
|
32
33
|
index: true,
|
|
33
|
-
element: <Navigate to={'app-content/
|
|
34
|
+
element: <Navigate to={'app-content/home'} />,
|
|
34
35
|
},
|
|
35
36
|
{
|
|
36
|
-
path: 'app-content/
|
|
37
|
+
path: 'app-content/home',
|
|
37
38
|
element: <AppContent />,
|
|
38
39
|
},
|
|
39
40
|
],
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Store } from 'pullstate';
|
|
2
|
-
export type ActivityLogType = {
|
|
3
|
-
activitiesData: any[];
|
|
4
|
-
lastTimestamp: number | null;
|
|
5
|
-
};
|
|
6
|
-
export type ActivityLogStoreType = {
|
|
7
|
-
[logType: string]: ActivityLogType;
|
|
8
|
-
};
|
|
9
|
-
export declare const ActivityLogStore: Store<ActivityLogStoreType>;
|
|
10
|
-
export default function ActivityLog({ apiEndpoint, params, }: {
|
|
11
|
-
apiEndpoint: string;
|
|
12
|
-
params: Record<string, any>;
|
|
13
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
interface ChangePasswordProps {
|
|
2
|
-
close: () => void;
|
|
3
|
-
}
|
|
4
|
-
export declare const StyledMenuItem: import("@mui/styled-engine").StyledComponent<import("@mui/material").MenuItemOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
|
|
5
|
-
ref?: import("react").Ref<HTMLLIElement>;
|
|
6
|
-
}, "children" | "disabled" | "className" | "style" | "classes" | "divider" | "sx" | "autoFocus" | "tabIndex" | "action" | "selected" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "dense" | "disableGutters"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
7
|
-
export declare function ChangePassword({ close }: ChangePasswordProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export declare const ChangePasswordDialog: React.FC;
|
|
9
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { SideMenuItemProps } from '@campxdev/react-blueprint';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
type Props = {
|
|
4
|
-
actions?: ReactNode[];
|
|
5
|
-
profileActions?: ReactNode[];
|
|
6
|
-
children?: ReactNode;
|
|
7
|
-
menu: SideMenuItemProps[];
|
|
8
|
-
mainContainerSx?: any;
|
|
9
|
-
handleLogout?: any;
|
|
10
|
-
userName?: string;
|
|
11
|
-
designation?: string;
|
|
12
|
-
clientName?: string;
|
|
13
|
-
institutionData?: any[];
|
|
14
|
-
defaultCollapsed?: boolean;
|
|
15
|
-
helpDocsConfig?: Record<string, {
|
|
16
|
-
actions: {
|
|
17
|
-
name: string;
|
|
18
|
-
onClick: () => void;
|
|
19
|
-
}[];
|
|
20
|
-
}>;
|
|
21
|
-
};
|
|
22
|
-
export declare const AppLayout: React.FC<Props>;
|
|
23
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
interface HelpDocsActionType {
|
|
3
|
-
name: string;
|
|
4
|
-
onClick?: () => void;
|
|
5
|
-
backgroundColor?: string;
|
|
6
|
-
}
|
|
7
|
-
interface HelpDocsProps {
|
|
8
|
-
actions: HelpDocsActionType[];
|
|
9
|
-
}
|
|
10
|
-
export declare const HelpDocs: React.FC<HelpDocsProps>;
|
|
11
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Store } from 'pullstate';
|
|
2
|
-
export type ActivityLogType = {
|
|
3
|
-
activitiesData: any[];
|
|
4
|
-
lastTimestamp: number | null;
|
|
5
|
-
};
|
|
6
|
-
export type ActivityLogStoreType = {
|
|
7
|
-
[logType: string]: ActivityLogType;
|
|
8
|
-
};
|
|
9
|
-
export declare const ActivityLogStore: Store<ActivityLogStoreType>;
|
|
10
|
-
export default function ActivityLog({ apiEndpoint, params, }: {
|
|
11
|
-
apiEndpoint: string;
|
|
12
|
-
params: Record<string, any>;
|
|
13
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
interface ChangePasswordProps {
|
|
2
|
-
close: () => void;
|
|
3
|
-
}
|
|
4
|
-
export declare const StyledMenuItem: import("@mui/styled-engine").StyledComponent<import("@mui/material").MenuItemOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
|
|
5
|
-
ref?: import("react").Ref<HTMLLIElement>;
|
|
6
|
-
}, "children" | "disabled" | "className" | "style" | "classes" | "divider" | "sx" | "autoFocus" | "tabIndex" | "action" | "selected" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "dense" | "disableGutters"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
7
|
-
export declare function ChangePassword({ close }: ChangePasswordProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export declare const ChangePasswordDialog: React.FC;
|
|
9
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { SideMenuItemProps } from '@campxdev/react-blueprint';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
type Props = {
|
|
4
|
-
actions?: ReactNode[];
|
|
5
|
-
profileActions?: ReactNode[];
|
|
6
|
-
children?: ReactNode;
|
|
7
|
-
menu: SideMenuItemProps[];
|
|
8
|
-
mainContainerSx?: any;
|
|
9
|
-
handleLogout?: any;
|
|
10
|
-
userName?: string;
|
|
11
|
-
designation?: string;
|
|
12
|
-
clientName?: string;
|
|
13
|
-
institutionData?: any[];
|
|
14
|
-
defaultCollapsed?: boolean;
|
|
15
|
-
helpDocsConfig?: Record<string, {
|
|
16
|
-
actions: {
|
|
17
|
-
name: string;
|
|
18
|
-
onClick: () => void;
|
|
19
|
-
}[];
|
|
20
|
-
}>;
|
|
21
|
-
};
|
|
22
|
-
export declare const AppLayout: React.FC<Props>;
|
|
23
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
interface HelpDocsActionType {
|
|
3
|
-
name: string;
|
|
4
|
-
onClick?: () => void;
|
|
5
|
-
backgroundColor?: string;
|
|
6
|
-
}
|
|
7
|
-
interface HelpDocsProps {
|
|
8
|
-
actions: HelpDocsActionType[];
|
|
9
|
-
}
|
|
10
|
-
export declare const HelpDocs: React.FC<HelpDocsProps>;
|
|
11
|
-
export {};
|
package/dist/types/theme.d.ts
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import '@mui/material/styles';
|
|
2
|
-
|
|
3
|
-
declare module '@mui/material/styles' {
|
|
4
|
-
interface Theme {
|
|
5
|
-
palette: {
|
|
6
|
-
[x: string]: any;
|
|
7
|
-
primary: {
|
|
8
|
-
dark: string;
|
|
9
|
-
main: string;
|
|
10
|
-
light: string;
|
|
11
|
-
};
|
|
12
|
-
secondary: {
|
|
13
|
-
main: string;
|
|
14
|
-
light: string;
|
|
15
|
-
dark: string;
|
|
16
|
-
};
|
|
17
|
-
tertiary: {
|
|
18
|
-
main: string;
|
|
19
|
-
};
|
|
20
|
-
text: {
|
|
21
|
-
primary: string;
|
|
22
|
-
secondary: string;
|
|
23
|
-
tertiary: string;
|
|
24
|
-
black: string;
|
|
25
|
-
white: string;
|
|
26
|
-
primaryContrast: string;
|
|
27
|
-
};
|
|
28
|
-
surface: {
|
|
29
|
-
defaultBackground: string;
|
|
30
|
-
paperBackground: string;
|
|
31
|
-
grey: string;
|
|
32
|
-
};
|
|
33
|
-
border: {
|
|
34
|
-
primary: string;
|
|
35
|
-
secondary: string;
|
|
36
|
-
};
|
|
37
|
-
highlight: {
|
|
38
|
-
highlightGreen: string;
|
|
39
|
-
highlightOrange: string;
|
|
40
|
-
highlightBlue: string;
|
|
41
|
-
highlightRed: string;
|
|
42
|
-
highlightPink: string;
|
|
43
|
-
highlightYellow: string;
|
|
44
|
-
greenBackground: string;
|
|
45
|
-
orangeBackground: string;
|
|
46
|
-
blueBackground: string;
|
|
47
|
-
redBackground: string;
|
|
48
|
-
pinkBackground: string;
|
|
49
|
-
yellowBackground: string;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
export function createTheme(options?: CustomThemeOptions): CustomTheme;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
declare module '@mui/material/Typography' {
|
|
57
|
-
interface TypographyPropsVariantOverrides {
|
|
58
|
-
label1: true;
|
|
59
|
-
label2: true;
|
|
60
|
-
subtitle3: true;
|
|
61
|
-
button1: true;
|
|
62
|
-
}
|
|
63
|
-
}
|
package/src/App.css
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
.App {
|
|
2
|
-
text-align: center;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.App-logo {
|
|
6
|
-
height: 40vmin;
|
|
7
|
-
pointer-events: none;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
11
|
-
.App-logo {
|
|
12
|
-
animation: App-logo-spin infinite 20s linear;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.App-header {
|
|
17
|
-
background-color: #282c34;
|
|
18
|
-
min-height: 100vh;
|
|
19
|
-
display: flex;
|
|
20
|
-
flex-direction: column;
|
|
21
|
-
align-items: center;
|
|
22
|
-
justify-content: center;
|
|
23
|
-
font-size: calc(10px + 2vmin);
|
|
24
|
-
color: white;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.App-link {
|
|
28
|
-
color: #61dafb;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
@keyframes App-logo-spin {
|
|
32
|
-
from {
|
|
33
|
-
transform: rotate(0deg);
|
|
34
|
-
}
|
|
35
|
-
to {
|
|
36
|
-
transform: rotate(360deg);
|
|
37
|
-
}
|
|
38
|
-
}
|