@campxdev/campx-web-utils 0.6.0 → 1.0.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.
Files changed (124) hide show
  1. package/dist/README.md +46 -0
  2. package/dist/cjs/index.js +4 -0
  3. package/dist/cjs/index.js.map +1 -0
  4. package/dist/cjs/types/src/App.d.ts +1 -0
  5. package/dist/cjs/types/src/AppContent.d.ts +2 -0
  6. package/dist/cjs/types/src/components/ActivityLog.d.ts +13 -0
  7. package/dist/cjs/types/src/components/ChangePassword.d.ts +9 -0
  8. package/dist/cjs/types/src/config/axios.d.ts +12 -0
  9. package/dist/cjs/types/src/context/ConfirmDialogProvider.d.ts +4 -0
  10. package/dist/cjs/types/src/context/ErrorBoundary/ErrorBoundary.d.ts +5 -0
  11. package/dist/cjs/types/src/context/ErrorBoundary/Login.d.ts +17 -0
  12. package/dist/cjs/types/src/context/Providers.d.ts +9 -0
  13. package/dist/cjs/types/src/context/SnackbarProvider.d.ts +6 -0
  14. package/dist/cjs/types/src/context/application-store.d.ts +65 -0
  15. package/dist/cjs/types/src/hooks/useConfirm.d.ts +8 -0
  16. package/dist/cjs/types/src/index.d.ts +1 -0
  17. package/dist/cjs/types/src/layout/AppLayout/AppLayout.d.ts +23 -0
  18. package/dist/cjs/types/src/layout/AppLayout/components/HelpDocs.d.ts +11 -0
  19. package/dist/cjs/types/src/reportWebVitals.d.ts +3 -0
  20. package/dist/cjs/types/src/routes/main.d.ts +13 -0
  21. package/dist/cjs/types/src/selectors/BatchSelector.d.ts +2 -0
  22. package/dist/cjs/types/src/selectors/CourseSelector.d.ts +2 -0
  23. package/dist/cjs/types/src/selectors/DepartmentSelector.d.ts +2 -0
  24. package/dist/cjs/types/src/selectors/EmployeesSelector.d.ts +2 -0
  25. package/dist/cjs/types/src/selectors/FeeTypeSelector.d.ts +2 -0
  26. package/dist/cjs/types/src/selectors/HostelFloorSelector.d.ts +2 -0
  27. package/dist/cjs/types/src/selectors/HostelRoomSelector.d.ts +2 -0
  28. package/dist/cjs/types/src/selectors/PrintFormatSelector.d.ts +2 -0
  29. package/dist/cjs/types/src/selectors/ProgramSelector.d.ts +2 -0
  30. package/dist/cjs/types/src/selectors/RegulationSelector.d.ts +2 -0
  31. package/dist/cjs/types/src/selectors/SemesterSelector.d.ts +2 -0
  32. package/dist/cjs/types/src/selectors/YearRangeSelector.d.ts +7 -0
  33. package/dist/cjs/types/src/selectors/utils.d.ts +9 -0
  34. package/dist/cjs/types/src/setupTests.d.ts +1 -0
  35. package/dist/cjs/types/src/utils/constants.d.ts +4 -0
  36. package/dist/esm/index.js +4 -0
  37. package/dist/esm/index.js.map +1 -0
  38. package/dist/esm/types/src/App.d.ts +1 -0
  39. package/dist/esm/types/src/AppContent.d.ts +2 -0
  40. package/dist/esm/types/src/components/ActivityLog.d.ts +13 -0
  41. package/dist/esm/types/src/components/ChangePassword.d.ts +9 -0
  42. package/dist/esm/types/src/config/axios.d.ts +12 -0
  43. package/dist/esm/types/src/context/ConfirmDialogProvider.d.ts +4 -0
  44. package/dist/esm/types/src/context/ErrorBoundary/ErrorBoundary.d.ts +5 -0
  45. package/dist/esm/types/src/context/ErrorBoundary/Login.d.ts +17 -0
  46. package/dist/esm/types/src/context/Providers.d.ts +9 -0
  47. package/dist/esm/types/src/context/SnackbarProvider.d.ts +6 -0
  48. package/dist/esm/types/src/context/application-store.d.ts +65 -0
  49. package/dist/esm/types/src/context/export.d.ts +5 -0
  50. package/dist/esm/types/src/hooks/export.d.ts +1 -0
  51. package/dist/esm/types/src/hooks/useConfirm.d.ts +8 -0
  52. package/dist/esm/types/src/index.d.ts +1 -0
  53. package/dist/esm/types/src/layout/AppLayout/AppLayout.d.ts +23 -0
  54. package/dist/esm/types/src/layout/AppLayout/components/HelpDocs.d.ts +11 -0
  55. package/dist/esm/types/src/reportWebVitals.d.ts +3 -0
  56. package/dist/esm/types/src/routes/main.d.ts +13 -0
  57. package/dist/esm/types/src/selectors/BatchSelector.d.ts +2 -0
  58. package/dist/esm/types/src/selectors/CourseSelector.d.ts +2 -0
  59. package/dist/esm/types/src/selectors/DepartmentSelector.d.ts +2 -0
  60. package/dist/esm/types/src/selectors/EmployeesSelector.d.ts +2 -0
  61. package/dist/esm/types/src/selectors/FeeTypeSelector.d.ts +2 -0
  62. package/dist/esm/types/src/selectors/HostelFloorSelector.d.ts +2 -0
  63. package/dist/esm/types/src/selectors/HostelRoomSelector.d.ts +2 -0
  64. package/dist/esm/types/src/selectors/PrintFormatSelector.d.ts +2 -0
  65. package/dist/esm/types/src/selectors/ProgramSelector.d.ts +2 -0
  66. package/dist/esm/types/src/selectors/RegulationSelector.d.ts +2 -0
  67. package/dist/esm/types/src/selectors/SemesterSelector.d.ts +2 -0
  68. package/dist/esm/types/src/selectors/YearRangeSelector.d.ts +7 -0
  69. package/dist/esm/types/src/selectors/export.d.ts +12 -0
  70. package/dist/esm/types/src/selectors/utils.d.ts +9 -0
  71. package/dist/esm/types/src/setupTests.d.ts +1 -0
  72. package/dist/esm/types/src/utils/constants.d.ts +4 -0
  73. package/dist/index.d.ts +193 -0
  74. package/package.json +50 -17
  75. package/.prettierrc +0 -7
  76. package/craco.config.js +0 -22
  77. package/export.ts +0 -7
  78. package/public/favicon.ico +0 -0
  79. package/public/index.html +0 -43
  80. package/public/logo192.png +0 -0
  81. package/public/logo512.png +0 -0
  82. package/public/manifest.json +0 -25
  83. package/public/robots.txt +0 -3
  84. package/src/App.css +0 -38
  85. package/src/App.tsx +0 -16
  86. package/src/AppContent.tsx +0 -30
  87. package/src/components/ActivityLog.tsx +0 -96
  88. package/src/components/ChangePassword.tsx +0 -169
  89. package/src/config/axios.ts +0 -92
  90. package/src/context/ConfirmDialogProvider.tsx +0 -78
  91. package/src/context/ErrorBoundary/ErrorBoundary.tsx +0 -131
  92. package/src/context/ErrorBoundary/Login.tsx +0 -202
  93. package/src/context/Providers.tsx +0 -64
  94. package/src/context/SnackbarProvider.tsx +0 -42
  95. package/src/context/application-store.ts +0 -87
  96. package/src/hooks/useConfirm.ts +0 -57
  97. package/src/index.css +0 -13
  98. package/src/index.tsx +0 -19
  99. package/src/layout/AppLayout/AppLayout.tsx +0 -151
  100. package/src/layout/AppLayout/components/HelpDocs.tsx +0 -123
  101. package/src/logo.svg +0 -1
  102. package/src/react-app-env.d.ts +0 -1
  103. package/src/reportWebVitals.ts +0 -15
  104. package/src/routes/main.tsx +0 -27
  105. package/src/selectors/BatchSelector.tsx +0 -15
  106. package/src/selectors/CourseSelector.tsx +0 -16
  107. package/src/selectors/DepartmentSelector.tsx +0 -19
  108. package/src/selectors/EmployeesSelector.tsx +0 -20
  109. package/src/selectors/FeeTypeSelector.tsx +0 -15
  110. package/src/selectors/HostelFloorSelector.tsx +0 -19
  111. package/src/selectors/HostelRoomSelector.tsx +0 -20
  112. package/src/selectors/PrintFormatSelector.tsx +0 -17
  113. package/src/selectors/ProgramSelector.tsx +0 -16
  114. package/src/selectors/RegulationSelector.tsx +0 -19
  115. package/src/selectors/SemesterSelector.tsx +0 -16
  116. package/src/selectors/YearRangeSelector.tsx +0 -26
  117. package/src/selectors/utils.tsx +0 -39
  118. package/src/setupTests.ts +0 -5
  119. package/src/utils/constants.ts +0 -18
  120. package/tsconfig.json +0 -22
  121. /package/{src/context/export.ts → dist/cjs/types/src/context/export.d.ts} +0 -0
  122. /package/{src/hooks/export.ts → dist/cjs/types/src/hooks/export.d.ts} +0 -0
  123. /package/{src/selectors/export.ts → dist/cjs/types/src/selectors/export.d.ts} +0 -0
  124. /package/{types → dist/types}/theme.d.ts +0 -0
@@ -0,0 +1,65 @@
1
+ import { ConfirmDialogType, Severity } from '@campxdev/react-blueprint';
2
+ import { Store } from 'pullstate';
3
+ type Classroom = {
4
+ id: number;
5
+ batchName?: string;
6
+ branchCode?: string;
7
+ courseId: number;
8
+ currentSemester: number;
9
+ name: string;
10
+ programId: number;
11
+ regulationId?: number;
12
+ section?: string;
13
+ timetableSlotTemplateId?: number;
14
+ };
15
+ export type ApplicationStoreType = {
16
+ isLoginDialogOpen: boolean;
17
+ snackbar: {
18
+ open: boolean;
19
+ message: string;
20
+ severity: Severity;
21
+ };
22
+ confirmDialog: {
23
+ isOpen: boolean;
24
+ title: string;
25
+ message: string;
26
+ onConfirm: () => void;
27
+ onCancel: () => void;
28
+ type: ConfirmDialogType;
29
+ confirmButtonText?: string;
30
+ cancelButtonText?: string;
31
+ };
32
+ user?: {
33
+ id: number;
34
+ fullName: string;
35
+ semNo?: number;
36
+ rollNo?: string;
37
+ courseId?: number;
38
+ branchCode?: string;
39
+ classroom?: Classroom;
40
+ email?: string;
41
+ employeeId?: string;
42
+ departmentIds?: string[];
43
+ designationId?: string;
44
+ institutionIds: number[];
45
+ isAdminUser?: boolean;
46
+ isSuperUser?: boolean;
47
+ studentId?: number;
48
+ admissionId?: string;
49
+ mStudentId?: string;
50
+ };
51
+ institution?: {
52
+ institutions?: [];
53
+ loading?: boolean;
54
+ error?: any;
55
+ current?: any;
56
+ };
57
+ asset?: {
58
+ favIcon?: string;
59
+ institutionLogo?: string;
60
+ institutionName?: string;
61
+ };
62
+ };
63
+ export declare const initialApplicationState: ApplicationStoreType;
64
+ export declare const ApplicationStore: Store<ApplicationStoreType>;
65
+ export {};
@@ -0,0 +1,5 @@
1
+ export * from './application-store';
2
+ export * from './ConfirmDialogProvider';
3
+ export * from './ErrorBoundary/ErrorBoundary';
4
+ export * from './Providers';
5
+ export * from './SnackbarProvider';
@@ -0,0 +1 @@
1
+ export * from './useConfirm';
@@ -0,0 +1,8 @@
1
+ import { ConfirmDialogType } from '@campxdev/react-blueprint';
2
+ export declare const useConfirm: () => ({ title, message, confirmButtonText, cancelButtonText, type, }: {
3
+ title: string;
4
+ message: string;
5
+ confirmButtonText?: string;
6
+ cancelButtonText?: string;
7
+ type?: ConfirmDialogType;
8
+ }) => Promise<boolean>;
@@ -0,0 +1 @@
1
+ import './index.css';
@@ -0,0 +1,23 @@
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 {};
@@ -0,0 +1,11 @@
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 {};
@@ -0,0 +1,3 @@
1
+ import { ReportHandler } from 'web-vitals';
2
+ declare const reportWebVitals: (onPerfEntry?: ReportHandler) => void;
3
+ export default reportWebVitals;
@@ -0,0 +1,13 @@
1
+ export declare const mainRoutes: {
2
+ path: string;
3
+ element: import("react/jsx-runtime").JSX.Element;
4
+ children: ({
5
+ index: boolean;
6
+ element: import("react/jsx-runtime").JSX.Element;
7
+ path?: undefined;
8
+ } | {
9
+ path: string;
10
+ element: import("react/jsx-runtime").JSX.Element;
11
+ index?: undefined;
12
+ })[];
13
+ }[];
@@ -0,0 +1,2 @@
1
+ import { SingleSelectProps } from '@campxdev/react-blueprint';
2
+ export declare const BatchSelector: (props: SingleSelectProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { SingleSelectProps } from '@campxdev/react-blueprint';
2
+ export declare const CourseSelector: (props: SingleSelectProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { SingleSelectProps } from '@campxdev/react-blueprint';
2
+ export declare const DepartmentSelector: (props: SingleSelectProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { SingleSelectProps } from '@campxdev/react-blueprint';
2
+ export declare const EmployeesSelector: (props: SingleSelectProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { SingleSelectProps } from '@campxdev/react-blueprint';
2
+ export declare const FeeTypeSelector: (props: SingleSelectProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { SingleSelectProps } from '@campxdev/react-blueprint';
2
+ export declare const HostelFloorSelector: (props: SingleSelectProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { SingleSelectProps } from '@campxdev/react-blueprint';
2
+ export declare const HostelRoomSelector: (props: SingleSelectProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { SingleSelectProps } from '@campxdev/react-blueprint';
2
+ export declare const PrintFormatSelector: (props: SingleSelectProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { SingleSelectProps } from '@campxdev/react-blueprint';
2
+ export declare const ProgramSelector: (props: SingleSelectProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { SingleSelectProps } from '@campxdev/react-blueprint';
2
+ export declare const RegulationSelector: (props: SingleSelectProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { SingleSelectProps } from '@campxdev/react-blueprint';
2
+ export declare const SemesterSelector: (props: SingleSelectProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { SingleSelectProps } from '@campxdev/react-blueprint';
2
+ interface YearRangeSelectorProps extends SingleSelectProps {
3
+ suffix?: string | null;
4
+ valueKey?: 'yearRange' | 'year';
5
+ }
6
+ export declare const YearRangeSelector: ({ suffix, valueKey, ...props }: YearRangeSelectorProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,12 @@
1
+ export * from './BatchSelector';
2
+ export * from './CourseSelector';
3
+ export * from './DepartmentSelector';
4
+ export * from './EmployeesSelector';
5
+ export * from './FeeTypeSelector';
6
+ export * from './HostelFloorSelector';
7
+ export * from './HostelRoomSelector';
8
+ export * from './PrintFormatSelector';
9
+ export * from './ProgramSelector';
10
+ export * from './RegulationSelector';
11
+ export * from './SemesterSelector';
12
+ export * from './YearRangeSelector';
@@ -0,0 +1,9 @@
1
+ export declare const FeeTypes: {
2
+ label: string;
3
+ value: string;
4
+ }[];
5
+ export declare const years: number[];
6
+ export declare const batchOptions: {
7
+ label: string;
8
+ value: string;
9
+ }[];
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,4 @@
1
+ export declare const isLocal: boolean;
2
+ export declare const isDevelopment: boolean;
3
+ export declare const tenantCode: string;
4
+ export declare const institutionCode: string;
@@ -0,0 +1,193 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as _emotion_styled from '@emotion/styled';
3
+ import * as _mui_system from '@mui/system';
4
+ import * as react from 'react';
5
+ import { ReactNode } from 'react';
6
+ import * as _mui_material_OverridableComponent from '@mui/material/OverridableComponent';
7
+ import * as _mui_material from '@mui/material';
8
+ import * as _axios from 'axios';
9
+ import { Severity, ConfirmDialogType, SideMenuItemProps, SingleSelectProps } from '@campxdev/react-blueprint';
10
+ import { Store } from 'pullstate';
11
+ import { ReducersMapObject } from '@reduxjs/toolkit';
12
+ export { BrowserRouter } from 'react-router-dom';
13
+
14
+ interface ChangePasswordProps {
15
+ close: () => void;
16
+ }
17
+ declare const StyledMenuItem: _emotion_styled.StyledComponent<_mui_material.MenuItemOwnProps & Omit<_mui_material.ButtonBaseOwnProps, "classes"> & _mui_material_OverridableComponent.CommonProps & Omit<Omit<react.DetailedHTMLProps<react.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
18
+ ref?: ((instance: HTMLLIElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLLIElement> | null | undefined;
19
+ }, "className" | "style" | "classes" | "action" | "centerRipple" | "children" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "autoFocus" | "dense" | "disableGutters" | "divider" | "selected"> & _mui_system.MUIStyledCommonProps<_mui_material.Theme>, {}, {}>;
20
+ declare function ChangePassword({ close }: ChangePasswordProps): react_jsx_runtime.JSX.Element;
21
+ declare const ChangePasswordDialog: React.FC;
22
+
23
+ declare global {
24
+ interface ImportMeta {
25
+ env: {
26
+ VITE_APP_API_HOST?: string;
27
+ };
28
+ }
29
+ }
30
+ declare const getBaseUrl: () => string;
31
+ declare const formatParams: (params: any) => {
32
+ [k: string]: unknown;
33
+ };
34
+ declare const axios: _axios.AxiosInstance;
35
+
36
+ type Classroom = {
37
+ id: number;
38
+ batchName?: string;
39
+ branchCode?: string;
40
+ courseId: number;
41
+ currentSemester: number;
42
+ name: string;
43
+ programId: number;
44
+ regulationId?: number;
45
+ section?: string;
46
+ timetableSlotTemplateId?: number;
47
+ };
48
+ type ApplicationStoreType = {
49
+ isLoginDialogOpen: boolean;
50
+ snackbar: {
51
+ open: boolean;
52
+ message: string;
53
+ severity: Severity;
54
+ };
55
+ confirmDialog: {
56
+ isOpen: boolean;
57
+ title: string;
58
+ message: string;
59
+ onConfirm: () => void;
60
+ onCancel: () => void;
61
+ type: ConfirmDialogType;
62
+ confirmButtonText?: string;
63
+ cancelButtonText?: string;
64
+ };
65
+ user?: {
66
+ id: number;
67
+ fullName: string;
68
+ semNo?: number;
69
+ rollNo?: string;
70
+ courseId?: number;
71
+ branchCode?: string;
72
+ classroom?: Classroom;
73
+ email?: string;
74
+ employeeId?: string;
75
+ departmentIds?: string[];
76
+ designationId?: string;
77
+ institutionIds: number[];
78
+ isAdminUser?: boolean;
79
+ isSuperUser?: boolean;
80
+ studentId?: number;
81
+ admissionId?: string;
82
+ mStudentId?: string;
83
+ };
84
+ institution?: {
85
+ institutions?: [];
86
+ loading?: boolean;
87
+ error?: any;
88
+ current?: any;
89
+ };
90
+ asset?: {
91
+ favIcon?: string;
92
+ institutionLogo?: string;
93
+ institutionName?: string;
94
+ };
95
+ };
96
+ declare const initialApplicationState: ApplicationStoreType;
97
+ declare const ApplicationStore: Store<ApplicationStoreType>;
98
+
99
+ declare const ConfirmDialogProvider: ({ children, }: {
100
+ children: ReactNode;
101
+ }) => react_jsx_runtime.JSX.Element;
102
+
103
+ type ErrorBoundaryProps = {
104
+ children: ReactNode;
105
+ };
106
+ declare const ErrorBoundary: (props: ErrorBoundaryProps) => react_jsx_runtime.JSX.Element;
107
+
108
+ declare const Providers: ({ children, basename, theme, reducers, }: {
109
+ children: ReactNode;
110
+ basename?: string;
111
+ theme?: any;
112
+ reducers?: ReducersMapObject;
113
+ }) => react_jsx_runtime.JSX.Element;
114
+
115
+ interface SnackbarProviderProps {
116
+ children: ReactNode;
117
+ }
118
+ declare const SnackbarProvider: ({ children }: SnackbarProviderProps) => react_jsx_runtime.JSX.Element;
119
+
120
+ declare const useConfirm: () => ({ title, message, confirmButtonText, cancelButtonText, type, }: {
121
+ title: string;
122
+ message: string;
123
+ confirmButtonText?: string;
124
+ cancelButtonText?: string;
125
+ type?: ConfirmDialogType;
126
+ }) => Promise<boolean>;
127
+
128
+ type Props = {
129
+ actions?: ReactNode[];
130
+ profileActions?: ReactNode[];
131
+ children?: ReactNode;
132
+ menu: SideMenuItemProps[];
133
+ mainContainerSx?: any;
134
+ handleLogout?: any;
135
+ userName?: string;
136
+ designation?: string;
137
+ clientName?: string;
138
+ institutionData?: any[];
139
+ defaultCollapsed?: boolean;
140
+ helpDocsConfig?: Record<string, {
141
+ actions: {
142
+ name: string;
143
+ onClick: () => void;
144
+ }[];
145
+ }>;
146
+ };
147
+ declare const AppLayout: React.FC<Props>;
148
+
149
+ interface HelpDocsActionType {
150
+ name: string;
151
+ onClick?: () => void;
152
+ backgroundColor?: string;
153
+ }
154
+ interface HelpDocsProps {
155
+ actions: HelpDocsActionType[];
156
+ }
157
+ declare const HelpDocs: react.FC<HelpDocsProps>;
158
+
159
+ declare const BatchSelector: (props: SingleSelectProps) => react_jsx_runtime.JSX.Element;
160
+
161
+ declare const CourseSelector: (props: SingleSelectProps) => react_jsx_runtime.JSX.Element;
162
+
163
+ declare const DepartmentSelector: (props: SingleSelectProps) => react_jsx_runtime.JSX.Element;
164
+
165
+ declare const EmployeesSelector: (props: SingleSelectProps) => react_jsx_runtime.JSX.Element;
166
+
167
+ declare const FeeTypeSelector: (props: SingleSelectProps) => react_jsx_runtime.JSX.Element;
168
+
169
+ declare const HostelFloorSelector: (props: SingleSelectProps) => react_jsx_runtime.JSX.Element;
170
+
171
+ declare const HostelRoomSelector: (props: SingleSelectProps) => react_jsx_runtime.JSX.Element;
172
+
173
+ declare const PrintFormatSelector: (props: SingleSelectProps) => react_jsx_runtime.JSX.Element;
174
+
175
+ declare const ProgramSelector: (props: SingleSelectProps) => react_jsx_runtime.JSX.Element;
176
+
177
+ declare const RegulationSelector: (props: SingleSelectProps) => react_jsx_runtime.JSX.Element;
178
+
179
+ declare const SemesterSelector: (props: SingleSelectProps) => react_jsx_runtime.JSX.Element;
180
+
181
+ interface YearRangeSelectorProps extends SingleSelectProps {
182
+ suffix?: string | null;
183
+ valueKey?: 'yearRange' | 'year';
184
+ }
185
+ declare const YearRangeSelector: ({ suffix, valueKey, ...props }: YearRangeSelectorProps) => react_jsx_runtime.JSX.Element;
186
+
187
+ declare const isLocal: boolean;
188
+ declare const isDevelopment: boolean;
189
+ declare const tenantCode: string | undefined;
190
+ declare const institutionCode: string | undefined;
191
+
192
+ export { AppLayout, ApplicationStore, BatchSelector, ChangePassword, ChangePasswordDialog, ConfirmDialogProvider, CourseSelector, DepartmentSelector, EmployeesSelector, ErrorBoundary, FeeTypeSelector, HelpDocs, HostelFloorSelector, HostelRoomSelector, PrintFormatSelector, ProgramSelector, Providers, RegulationSelector, SemesterSelector, SnackbarProvider, StyledMenuItem, YearRangeSelector, axios, formatParams, getBaseUrl, initialApplicationState, institutionCode, isDevelopment, isLocal, tenantCode, useConfirm };
193
+ export type { ApplicationStoreType, ErrorBoundaryProps };
package/package.json CHANGED
@@ -1,25 +1,40 @@
1
1
  {
2
2
  "name": "@campxdev/campx-web-utils",
3
- "version": "0.6.0",
4
- "main": "./export.ts",
3
+ "version": "1.0.0",
4
+ "author": "CampX",
5
+ "license": "MIT",
6
+ "keywords": [
7
+ "react",
8
+ "ui",
9
+ "components",
10
+ "campx",
11
+ "utils"
12
+ ],
13
+ "main": "dist/cjs/index.js",
14
+ "module": "dist/esm/index.js",
15
+ "types": "dist/index.d.ts",
16
+ "files": [
17
+ "dist"
18
+ ],
5
19
  "private": false,
6
20
  "peerDependencies": {
7
- "@campxdev/react-blueprint": ">=1.9.5",
8
- "@emotion/react": ">=^11.13.3",
9
- "@emotion/styled": ">=^11.13.0",
10
- "@mui/icons-material": ">=6.1.5",
11
- "@mui/material": ">=6.1.5",
12
- "@mui/x-data-grid": ">=7.22.1",
13
- "@mui/x-date-pickers": ">=7.22.1",
14
- "react-redux": "=>9.1.2"
21
+ "@campxdev/react-blueprint": ">=2.0.1",
22
+ "@emotion/react": "^11.13.0",
23
+ "@emotion/styled": "^11.13.0",
24
+ "@mui/icons-material": "^6.1.5",
25
+ "@mui/material": "^6.1.5",
26
+ "@mui/x-data-grid": "^7.22.1",
27
+ "@mui/x-date-pickers": "^7.22.1",
28
+ "react-redux": "=>9.1.2",
29
+ "react-router-dom": "^6.22.0"
15
30
  },
16
31
  "dependencies": {
17
- "@campxdev/react-blueprint": "1.9.5",
18
- "@hookform/resolvers": "2.9.10",
19
- "@mui/x-date-pickers": "^7.22.1",
32
+ "@campxdev/react-blueprint": "2.0.1",
33
+ "@hookform/resolvers": "^2.9.10",
34
+ "@mui/x-date-pickers": "^8.1.0",
20
35
  "axios": "^1.7.2",
21
36
  "cookie-js": "^0.0.1",
22
- "date-fns": "^3.6.0",
37
+ "date-fns": "^4.1.0",
23
38
  "device-detector-js": "^3.0.3",
24
39
  "framer-motion": "^11.3.21",
25
40
  "pullstate": "^1.25.0",
@@ -28,6 +43,7 @@
28
43
  "react-hook-form": "^7.52.1",
29
44
  "react-query": "^3.39.3",
30
45
  "react-redux": "^9.1.2",
46
+ "react-router-dom": "^6.22.0",
31
47
  "react-scripts": "5.0.1",
32
48
  "react-toastify": "^9.0.1",
33
49
  "typescript": "^5.5.2",
@@ -38,6 +54,15 @@
38
54
  "devDependencies": {
39
55
  "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
40
56
  "@craco/craco": "^7.1.0",
57
+ "@rollup/plugin-babel": "^6.0.4",
58
+ "@rollup/plugin-commonjs": "^25.0.7",
59
+ "@rollup/plugin-image": "^3.0.3",
60
+ "@rollup/plugin-json": "^6.1.0",
61
+ "@rollup/plugin-node-resolve": "^15.2.3",
62
+ "@rollup/plugin-terser": "^0.4.4",
63
+ "@rollup/plugin-typescript": "^11.1.6",
64
+ "@rollup/plugin-url": "^8.0.2",
65
+ "@svgr/rollup": "^8.1.0",
41
66
  "@testing-library/jest-dom": "^5.14.1",
42
67
  "@testing-library/react": "^13.0.0",
43
68
  "@testing-library/user-event": "^13.2.1",
@@ -54,13 +79,21 @@
54
79
  "@types/react": "^18.3.3",
55
80
  "@types/react-dom": "^18.3.0",
56
81
  "@types/react-query": "^1.2.9",
57
- "@types/react-router-dom": "^5.3.3"
82
+ "@types/react-router-dom": "^5.3.3",
83
+ "rollup": "^4.10.0",
84
+ "rollup-plugin-copy": "^3.5.0",
85
+ "rollup-plugin-delete": "^2.0.0",
86
+ "rollup-plugin-dts": "^6.2.1",
87
+ "rollup-plugin-peer-deps-external": "^2.2.4",
88
+ "rollup-plugin-postcss": "^4.0.2",
89
+ "rollup-plugin-visualizer": "^5.12.0"
58
90
  },
59
91
  "scripts": {
60
92
  "start": "craco start",
61
- "build": "craco build",
62
93
  "test": "craco test",
63
- "eject": "react-scripts eject"
94
+ "eject": "react-scripts eject",
95
+ "build": "rollup -c --bundleConfigAsCjs",
96
+ "prepare": "npm run build"
64
97
  },
65
98
  "eslintConfig": {
66
99
  "extends": [
package/.prettierrc DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "bracketSpacing": true,
3
- "singleQuote": true,
4
- "trailingComma": "all",
5
- "useTabs": false,
6
- "bracketSameLine": false
7
- }
package/craco.config.js DELETED
@@ -1,22 +0,0 @@
1
- const path = require('path');
2
- const { getLoader, loaderByName } = require('@craco/craco');
3
- const packages = [];
4
- packages.push(path.dirname(require.resolve('@campxdev/react-blueprint')));
5
- module.exports = {
6
- webpack: {
7
- configure: (webpackConfig) => {
8
- const { isFound, match } = getLoader(
9
- webpackConfig,
10
- loaderByName('babel-loader'),
11
- );
12
- if (isFound) {
13
- const include = Array.isArray(match.loader.include)
14
- ? match.loader.include
15
- : [match.loader.include];
16
- match.loader.include = include.concat(packages);
17
- }
18
-
19
- return webpackConfig;
20
- },
21
- },
22
- };
package/export.ts DELETED
@@ -1,7 +0,0 @@
1
- export * from './src/components/ChangePassword';
2
- export * from './src/config/axios';
3
- export * from './src/context/export';
4
- export * from './src/hooks/export';
5
- export * from './src/layout/AppLayout/AppLayout';
6
- export * from './src/selectors/export';
7
- export * from './src/utils/constants';
Binary file
package/public/index.html DELETED
@@ -1,43 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8" />
5
- <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1" />
7
- <meta name="theme-color" content="#000000" />
8
- <meta
9
- name="description"
10
- content="Web site created using create-react-app"
11
- />
12
- <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
13
- <!--
14
- manifest.json provides metadata used when your web app is installed on a
15
- user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
16
- -->
17
- <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
18
- <!--
19
- Notice the use of %PUBLIC_URL% in the tags above.
20
- It will be replaced with the URL of the `public` folder during the build.
21
- Only files inside the `public` folder can be referenced from the HTML.
22
-
23
- Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
24
- work correctly both with client-side routing and a non-root public URL.
25
- Learn how to configure a non-root public URL by running `npm run build`.
26
- -->
27
- <title>React App</title>
28
- </head>
29
- <body>
30
- <noscript>You need to enable JavaScript to run this app.</noscript>
31
- <div id="root"></div>
32
- <!--
33
- This HTML file is a template.
34
- If you open it directly in the browser, you will see an empty page.
35
-
36
- You can add webfonts, meta tags, or analytics to this file.
37
- The build step will place the bundled scripts into the <body> tag.
38
-
39
- To begin the development, run `npm start` or `yarn start`.
40
- To create a production bundle, use `npm run build` or `yarn build`.
41
- -->
42
- </body>
43
- </html>
Binary file
Binary file
@@ -1,25 +0,0 @@
1
- {
2
- "short_name": "React App",
3
- "name": "Create React App Sample",
4
- "icons": [
5
- {
6
- "src": "favicon.ico",
7
- "sizes": "64x64 32x32 24x24 16x16",
8
- "type": "image/x-icon"
9
- },
10
- {
11
- "src": "logo192.png",
12
- "type": "image/png",
13
- "sizes": "192x192"
14
- },
15
- {
16
- "src": "logo512.png",
17
- "type": "image/png",
18
- "sizes": "512x512"
19
- }
20
- ],
21
- "start_url": ".",
22
- "display": "standalone",
23
- "theme_color": "#000000",
24
- "background_color": "#ffffff"
25
- }
package/public/robots.txt DELETED
@@ -1,3 +0,0 @@
1
- # https://www.robotstxt.org/robotstxt.html
2
- User-agent: *
3
- Disallow: