icleafreportui 0.1.0 → 0.1.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.
Files changed (92) hide show
  1. package/dist/App.js +52 -0
  2. package/dist/Login.js +177 -0
  3. package/dist/Reports/CourseReport.js +243 -0
  4. package/dist/Reports/ExamPackReport.js +559 -0
  5. package/dist/Reports/ExamReport.js +290 -0
  6. package/dist/Reports/Report.js +299 -0
  7. package/dist/api/client.js +44 -0
  8. package/dist/components/Header.js +147 -0
  9. package/dist/components/Loader.js +30 -0
  10. package/dist/components/imagePathUrl.js +17 -0
  11. package/dist/components/sidebar.js +78 -0
  12. package/dist/context/TenantProvider.js +34 -0
  13. package/dist/index.js +19 -0
  14. package/dist/package.js +101 -0
  15. package/dist/reportWebVitals.js +27 -0
  16. package/dist/setupTests.js +3 -0
  17. package/package.json +11 -3
  18. package/.env +0 -7
  19. package/public/favicon.ico +0 -0
  20. package/public/images/EResourcesImg.png +0 -0
  21. package/public/images/courseCardImg.png +0 -0
  22. package/public/images/courseInfo.png +0 -0
  23. package/public/images/exam-options.png +0 -0
  24. package/public/images/icleaf-11.png +0 -0
  25. package/public/images/icleaf_logo.png +0 -0
  26. package/public/images/template.png +0 -0
  27. package/public/images/unnamed.png +0 -0
  28. package/public/images/user.jpg +0 -0
  29. package/public/images/young-man-studying-library-using-laptop-1.png +0 -0
  30. package/public/index.html +0 -45
  31. package/public/logo192.png +0 -0
  32. package/public/logo512.png +0 -0
  33. package/public/manifest.json +0 -25
  34. package/public/robots.txt +0 -3
  35. package/src/App.js +0 -37
  36. package/src/Login.js +0 -159
  37. package/src/Reports/CourseReport.js +0 -209
  38. package/src/Reports/ExamPackReport.js +0 -554
  39. package/src/Reports/ExamReport.js +0 -269
  40. package/src/Reports/Report.js +0 -271
  41. package/src/api/client.jsx +0 -42
  42. package/src/components/Header.jsx +0 -192
  43. package/src/components/Loader.jsx +0 -23
  44. package/src/components/imagePathUrl.jsx +0 -11
  45. package/src/components/sidebar.jsx +0 -81
  46. package/src/context/TenantProvider.jsx +0 -22
  47. package/src/index.js +0 -21
  48. package/src/package.js +0 -10
  49. package/src/reportWebVitals.js +0 -13
  50. package/src/setupTests.js +0 -5
  51. /package/{src → dist}/App.css +0 -0
  52. /package/{src → dist}/components/Header.css +0 -0
  53. /package/{src → dist}/components/sidebar.css +0 -0
  54. /package/{src → dist}/fonts/210000.jpg +0 -0
  55. /package/{src → dist}/fonts/210001.jpg +0 -0
  56. /package/{src → dist}/fonts/210003.jpg +0 -0
  57. /package/{src → dist}/fonts/210004.jpg +0 -0
  58. /package/{src → dist}/fonts/210006.jpg +0 -0
  59. /package/{src → dist}/fonts/210018.jpg +0 -0
  60. /package/{src → dist}/fonts/210019.jpg +0 -0
  61. /package/{src → dist}/fonts/210020.jpg +0 -0
  62. /package/{src → dist}/fonts/210279.jpg +0 -0
  63. /package/{src → dist}/fonts/210280.jpg +0 -0
  64. /package/{src → dist}/fonts/Gilroy-Black.ttf +0 -0
  65. /package/{src → dist}/fonts/Gilroy-BlackItalic.ttf +0 -0
  66. /package/{src → dist}/fonts/Gilroy-Bold.ttf +0 -0
  67. /package/{src → dist}/fonts/Gilroy-BoldItalic.ttf +0 -0
  68. /package/{src → dist}/fonts/Gilroy-ExtraBold.ttf +0 -0
  69. /package/{src → dist}/fonts/Gilroy-ExtraBoldItalic.ttf +0 -0
  70. /package/{src → dist}/fonts/Gilroy-Heavy.ttf +0 -0
  71. /package/{src → dist}/fonts/Gilroy-HeavyItalic.ttf +0 -0
  72. /package/{src → dist}/fonts/Gilroy-Light.ttf +0 -0
  73. /package/{src → dist}/fonts/Gilroy-LightItalic.ttf +0 -0
  74. /package/{src → dist}/fonts/Gilroy-Medium.ttf +0 -0
  75. /package/{src → dist}/fonts/Gilroy-MediumItalic.ttf +0 -0
  76. /package/{src → dist}/fonts/Gilroy-Regular.ttf +0 -0
  77. /package/{src → dist}/fonts/Gilroy-RegularItalic.ttf +0 -0
  78. /package/{src → dist}/fonts/Gilroy-SemiBold.ttf +0 -0
  79. /package/{src → dist}/fonts/Gilroy-SemiBoldItalic.ttf +0 -0
  80. /package/{src → dist}/fonts/Gilroy-Thin.ttf +0 -0
  81. /package/{src → dist}/fonts/Gilroy-ThinItalic.ttf +0 -0
  82. /package/{src → dist}/fonts/Gilroy-UltraLight.ttf +0 -0
  83. /package/{src → dist}/fonts/Gilroy-UltraLightItalic.ttf +0 -0
  84. /package/{src → dist}/fonts/Help - Guide Document.pdf +0 -0
  85. /package/{src → dist}/fonts/License.txt +0 -0
  86. /package/{src → dist}/fonts/More Free Fonts on fontshmonts.com.url +0 -0
  87. /package/{src → dist}/fonts/cover.jpg +0 -0
  88. /package/{src → dist}/index.css +0 -0
  89. /package/{src → dist}/login.css +0 -0
  90. /package/{src → dist}/logo.svg +0 -0
  91. /package/{src → dist}/styles.css +0 -0
  92. /package/{src → dist}/theme.css +0 -0
@@ -1,192 +0,0 @@
1
- import React, { useState, useEffect } from 'react';
2
- import { useNavigate } from 'react-router-dom';
3
- import { FaPowerOff } from "react-icons/fa";
4
- import { MdFiberManualRecord, MdLogout, MdOutlineLockReset } from "react-icons/md";
5
- import { IoIosList, IoIosSettings } from "react-icons/io";
6
- import { GiHamburgerMenu } from "react-icons/gi";
7
- import Popover from '@mui/material/Popover';
8
- import { Link, useLocation } from 'react-router-dom';
9
- import "./Header.css"
10
- import { MdKeyboardArrowDown, MdAssignment } from "react-icons/md";
11
- import { RiHome5Fill, RiLogoutCircleRLine, RiMenuFoldLine } from "react-icons/ri";
12
- import { HiBookmarkSquare, HiOutlineUser } from "react-icons/hi2";
13
- import { TbDeviceMobileFilled } from "react-icons/tb";
14
- import { IoBookOutline, IoCalendar, IoCalendarOutline, IoCartOutline, IoLanguage, IoLibraryOutline, IoLogOutOutline, IoPencilOutline, IoPersonCircleOutline, IoPersonOutline, IoSettingsOutline, IoShuffle, IoShuffleOutline } from "react-icons/io5";
15
- import { TfiMenuAlt } from "react-icons/tfi";
16
- import { RotatingLines } from 'react-loader-spinner';
17
- import { Drawer } from 'antd'; // Import Drawer from antd
18
- import './Header.css';
19
- import { BiSolidBookContent, BiSolidUserPin } from "react-icons/bi";
20
- import { FaCheck, FaCircleInfo } from "react-icons/fa6";
21
- import { PiExamFill, PiShuffleAngularBold } from "react-icons/pi";
22
- import { RiRedPacketLine } from "react-icons/ri";
23
- import { MdMenuBook, MdKeyboardArrowRight, MdCorporateFare } from "react-icons/md";
24
- import { IoGameControllerSharp } from "react-icons/io5";
25
- import commonImagePathUrlPrefix, { logo } from './imagePathUrl';
26
-
27
- const Header = () => {
28
- const navigate = useNavigate()
29
- const [show, setShow] = useState(false);
30
- const location = useLocation();
31
- const [activeMenuItem, setActiveMenuItem] = useState(location.pathname);
32
- const [isSideMenu, setSideMenu] = useState("");
33
- const [userChooseLan, setUserChooseLan] = useState("en")
34
-
35
- const [drawerVisible, setDrawerVisible] = useState(false);
36
- const [userEmail] = useState(localStorage.getItem("email"));
37
- const [userName] = useState(localStorage.getItem("fName") + " " + localStorage.getItem("lName"))
38
- const roleId = localStorage.getItem("roleId")
39
- const [manageContentSubMenuOpen, setManageContentSubMenuOpen] = useState(false);
40
- const [manageExamSubMenuOpen, setManageExamSubMenuOpen] = useState(false);
41
- const [managePackSubMenuOpen, setManagePackSubMenuOpen] = useState(false);
42
- const [manageUserSubMenuOpen, setManageUserSubMenuOpen] = useState(false);
43
- const [manageCorporateSubMenuOpen, setManageCorporateSubMenuOpen] = useState(false);
44
- const [manageControlSubMenuOpen, setManageControlSubMenuOpen] = useState(false);
45
-
46
- const [usernames, setUserNames] = useState("");
47
- const [userimg, setUserImg] = useState("");
48
- const [availableCredit, setAvailableCredit] = useState("");
49
- const [buyCredit, setbuyCredit] = useState("");
50
- const [storageB, setStroageB] = useState("");
51
- const [storagelimit, setStorageLimit] = useState("");
52
- const [buy, setbuy] = useState('')
53
- const [totalbuy, settotalbuy] = useState('')
54
-
55
-
56
- const token = localStorage.getItem("token");
57
- const headers = {
58
- Authorization: `Bearer ${token}`,
59
- };
60
- const name = localStorage.getItem("fName")
61
- const [showAlert, setShowAlert] = useState(false);
62
- const [alertMessage, setAlertMessage] = useState('');
63
- const userImage = localStorage.getItem("profileImg");
64
- const [userNameEvaluator] = useState(localStorage.getItem("userName"));
65
-
66
- useEffect(() => {
67
- if (localStorage.getItem("consentChkFlg") === "false") {
68
- // navigate("/myProfile")
69
- } else {
70
- // setShowAlert(false);
71
- }
72
- }, []);
73
-
74
-
75
-
76
-
77
-
78
-
79
-
80
- const handlesidebar = () => {
81
- if (window.innerWidth < 1001) {
82
- // If the screen width is less than 800px, toggle the drawer visibility
83
- setDrawerVisible(!drawerVisible);
84
- } else {
85
- // If the screen width is 800px or more, toggle the 'mini-sidebar' class
86
- document.body.classList.toggle('mini-sidebar');
87
- }
88
- }
89
-
90
-
91
-
92
-
93
-
94
-
95
- const handleOutsideClick = (e) => {
96
- const dropdownMenu = document.querySelector(".user-menu");
97
- const mobileDropdownMenu = document.querySelector(".mobile-user-menu");
98
- const mobileSideMenu = document.querySelector("#mobile_btn");
99
-
100
- if (
101
- dropdownMenu &&
102
- !dropdownMenu.contains(e.target) &&
103
- !mobileDropdownMenu?.contains(e.target) &&
104
- !mobileSideMenu?.contains(e.target)
105
- ) {
106
- setShow(false);
107
- // setMobileshow(false);
108
- // setShow1(false);
109
- document.body.classList.remove("slide-nav");
110
- }
111
- };
112
- // useEffect(() => {
113
-
114
- // }, []);
115
- useEffect(() => {
116
- window.scrollTo(0, 0);
117
- document.addEventListener("click", handleOutsideClick);
118
-
119
- return () => {
120
- document.removeEventListener("click", handleOutsideClick);
121
- };
122
- }, []);
123
-
124
- const [anchorEl, setAnchorEl] = useState(null);
125
- const [anchorLang, setAnchorLang] = useState(null);
126
-
127
- const handleClick = (event) => {
128
- setAnchorEl(event.currentTarget);
129
- };
130
-
131
- const handleClose = () => {
132
- setAnchorEl(null);
133
- };
134
-
135
-
136
- const handleLangClick = (event) => {
137
- setAnchorLang(event.currentTarget);
138
- };
139
-
140
- const handleLangClose = () => {
141
- setAnchorLang(null);
142
- };
143
-
144
- const open = Boolean(anchorEl);
145
- const open1 = Boolean(anchorLang);
146
- const id = open ? 'simple-popover' : undefined;
147
- const lang_id = open1 ? 'lang-simple-popover' : undefined;
148
-
149
-
150
-
151
- const handleChange = (value) => {
152
- window.location.reload()
153
-
154
- setUserChooseLan(value);
155
- };
156
-
157
- const handleLogout = () => {
158
- localStorage.clear(); // Clear all local storage
159
- // navigate('/login'); // Navigate to login page
160
- window.location.reload();
161
- };
162
-
163
-
164
- return (
165
- <div className='header_whole_container'>
166
- <div style={{ display: "flex", alignItems: "center" }}>
167
- {/* <div>
168
- <RiMenuFoldLine
169
- cursor="pointer"
170
- onClick={handlesidebar}
171
- size={30}
172
- className='header1-toggle-icon'
173
- tabIndex={0}
174
- onKeyDown={(event) => {
175
- if (event.key === 'Enter') {
176
- handlesidebar()
177
- }
178
- }}
179
- />
180
- </div> */}
181
- </div>
182
- <div className='acc_conf_main' onClick={handleLogout}>
183
- <FaPowerOff tabIndex={0}
184
- size={30} aria-describedby={id} variant="contained" className="account-mnu-icon" />
185
- </div>
186
- {/* <button onClick={handleLogout}>
187
- Logout</button> */}
188
- </div>
189
- );
190
- };
191
-
192
- export default Header;
@@ -1,23 +0,0 @@
1
- import React, { useState, useEffect } from 'react';
2
- import { Modal } from 'react-bootstrap';
3
- import { RotatingLines } from 'react-loader-spinner'
4
-
5
-
6
- function Loader({ visible }) {
7
- const [value, setValue] = useState(visible);
8
-
9
-
10
- return (
11
- <Modal onShow={true} style={{ background: "transperent" }}>
12
- <RotatingLines
13
- strokeColor="grey"
14
- strokeWidth="5"
15
- animationDuration="0.75"
16
- width="96"
17
- visible={true}
18
- />
19
- </Modal>
20
- )
21
-
22
- }
23
- export default Loader;
@@ -1,11 +0,0 @@
1
- export default "https://groupnpay.com/iccloud";
2
- export const elearnImagePathUrlPrefix = "https://groupnpay.com/iccloud/qhubresources/elearn";
3
- // export const commonImagePathUrlPrefix = "http://64.227.170.125:8080/iccloud";
4
- // export const elearnImagePathUrlPrefix = "http://64.227.170.125:8080/iccloud/qhubresources/elearn";
5
- // export const commonImagePathUrlPrefix = "http://139.59.64.128:8080/iccloud";
6
- // export const elearnImagePathUrlPrefix = "http://139.59.64.128:8080/iccloud/qhubresources/elearn";
7
- // export const commonImagePathUrlPrefix = "http://192.168.3.155:8080/icleaf";
8
- // export const elearnImagePathUrlPrefix = "http://192.168.3.155:8080/icleaf/qhubresources/elearn";
9
- export const logo = process.env.PUBLIC_URL + '/images/icleaf_logo.png';
10
- export const youngMan = process.env.PUBLIC_URL + '/images/young-man-studying-library-using-laptop-1.png';
11
- export const baseName = "/icleaf/#"
@@ -1,81 +0,0 @@
1
- import React, { useEffect, useState } from 'react';
2
- import { Link, useLocation } from 'react-router-dom';
3
- import { BiSolidBookContent } from "react-icons/bi";
4
- import { logo } from './imagePathUrl';
5
- import "./sidebar.css";
6
-
7
- const Sidebar = () => {
8
- const location = useLocation();
9
- const [activeMenuItem, setActiveMenuItem] = useState(location.pathname);
10
- const [drawerVisible, setDrawerVisible] = useState(window.innerWidth <= 1001);
11
-
12
- const handleResize = () => {
13
- setDrawerVisible(window.innerWidth < 1001);
14
- };
15
-
16
- useEffect(() => {
17
- window.addEventListener('resize', handleResize);
18
- return () => {
19
- window.removeEventListener('resize', handleResize);
20
- };
21
- }, []);
22
-
23
- const handleDrawerClose = () => {
24
- setDrawerVisible(false);
25
- };
26
-
27
- return (
28
- <div className={`sidebar`}>
29
- <div className='header_logo_container'>
30
- <img src={logo} className='header_logo_img' alt="Your Image" />
31
- </div>
32
- <div className="sidebar-inner">
33
- <div id="sidebar-menu" className="sidebar-menu">
34
- <ul>
35
- <li>
36
- <Link className={activeMenuItem === "/Report" ? "activeExamLi" : "inactiveExamLi"} to="/Report">
37
- <i className='icon_background'>
38
- <BiSolidBookContent className="manage_content_icon" />
39
- </i>
40
- <span>Exam Report</span>
41
- </Link>
42
- </li>
43
- <li>
44
- <Link className={activeMenuItem === "/CourseReport" ? "activeExamLi" : "inactiveExamLi"} to="/CourseReport">
45
- <i className='icon_background'>
46
- <BiSolidBookContent className="manage_content_icon" />
47
- </i>
48
- <span>Course Report</span>
49
- </Link>
50
- </li>
51
- <li>
52
- <Link className={activeMenuItem === "/examReport" ? "activeExamLi" : "inactiveExamLi"} to="/examReport">
53
- <i className='icon_background'>
54
- <BiSolidBookContent className="manage_content_icon" />
55
- </i>
56
- <span>Exam Questions Report</span>
57
- </Link>
58
- </li>
59
- <li>
60
- <Link className={activeMenuItem === "/examPackReport" ? "activeExamLi" : "inactiveExamLi"} to="/examPackReport">
61
- <i className='icon_background'>
62
- <BiSolidBookContent className="manage_content_icon" />
63
- </i>
64
- <span>Exam Pack Report</span>
65
- </Link>
66
- </li>
67
- </ul>
68
- </div>
69
- </div>
70
-
71
- <div className='comp-info-main'>
72
- <div>
73
- <div>Copyright © 2021 ICLeaF. All Rights Reserved</div>
74
- <div>Powered by <Link target='_blank' to='https://infocareerindia.com/'>Infocareer Pvt Ltd.</Link></div>
75
- </div>
76
- </div>
77
- </div>
78
- );
79
- };
80
-
81
- export default Sidebar;
@@ -1,22 +0,0 @@
1
- import React, { createContext, useContext } from 'react';
2
- import TenantApiClient from '../api/client';
3
-
4
- const TenantContext = createContext();
5
-
6
- export const TenantProvider = ({ children, config }) => {
7
- const apiClient = new TenantApiClient(config);
8
-
9
- return (
10
- <TenantContext.Provider value={{ apiClient, config }}>
11
- {children}
12
- </TenantContext.Provider>
13
- );
14
- };
15
-
16
- export const useTenant = () => {
17
- const context = useContext(TenantContext);
18
- if (!context) {
19
- throw new Error('useTenant must be used within TenantProvider');
20
- }
21
- return context;
22
- };
package/src/index.js DELETED
@@ -1,21 +0,0 @@
1
- import React from 'react';
2
- import ReactDOM from 'react-dom/client';
3
- import './index.css';
4
- import App from './App';
5
- import './theme.css'
6
- import reportWebVitals from './reportWebVitals';
7
- import { StyledEngineProvider } from '@mui/material/styles';
8
-
9
- const root = ReactDOM.createRoot(document.getElementById('root'));
10
- root.render(
11
- <React.StrictMode>
12
- <StyledEngineProvider injectFirst>
13
- <App />
14
- </StyledEngineProvider>
15
- </React.StrictMode>
16
- );
17
-
18
- // If you want to start measuring performance in your app, pass a function
19
- // to log results (for example: reportWebVitals(console.log))
20
- // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
21
- reportWebVitals();
package/src/package.js DELETED
@@ -1,10 +0,0 @@
1
- // Export components for npm package
2
-
3
- export { default as Report } from './components/Report';
4
- export { default as Dashboard } from './components/Dashboard';
5
- export { default as Header } from './components/Header';
6
- export { default as Sidebar } from './components/sidebar';
7
- export { default as Loader } from './components/Loader';
8
-
9
- // Export image config
10
- export { default as imageBaseUrl, elearnImagePathUrlPrefix, logo, youngMan, baseName } from './components/imagePathUrl';
@@ -1,13 +0,0 @@
1
- const reportWebVitals = onPerfEntry => {
2
- if (onPerfEntry && onPerfEntry instanceof Function) {
3
- import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
4
- getCLS(onPerfEntry);
5
- getFID(onPerfEntry);
6
- getFCP(onPerfEntry);
7
- getLCP(onPerfEntry);
8
- getTTFB(onPerfEntry);
9
- });
10
- }
11
- };
12
-
13
- export default reportWebVitals;
package/src/setupTests.js DELETED
@@ -1,5 +0,0 @@
1
- // jest-dom adds custom jest matchers for asserting on DOM nodes.
2
- // allows you to do things like:
3
- // expect(element).toHaveTextContent(/react/i)
4
- // learn more: https://github.com/testing-library/jest-dom
5
- import '@testing-library/jest-dom';
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes