@campxdev/react-blueprint 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -1
- package/public/index.html +25 -1
- package/src/App.tsx +8 -1
- package/src/AppContent.tsx +38 -0
- package/src/assets/images/svg/Emptylistmage.svg +9 -0
- package/src/assets/images/svg/Internalserverimage.svg +9 -0
- package/src/assets/images/svg/error-cactus.svg +9 -0
- package/src/assets/images/svg/index.ts +10 -0
- package/src/assets/images/svg/no-connection.svg +9 -0
- package/src/assets/images/svg/unauthorized.svg +9 -0
- package/src/components/Assets/ErrorPages/InternalServerError.tsx +31 -0
- package/src/components/Assets/ErrorPages/NoInternetConnection.tsx +33 -0
- package/src/components/Assets/ErrorPages/NoItemFound.tsx +33 -0
- package/src/components/Assets/ErrorPages/PageNotFound.tsx +33 -0
- package/src/components/Assets/ErrorPages/UnAuthorized.tsx +25 -0
- package/src/components/Assets/ErrorPages/styles.tsx +29 -0
- package/src/components/Assets/export.ts +5 -0
- package/src/components/Input/components/FetchingOptionsLoader.tsx +7 -7
- package/src/components/Layout/AppHeader/AppHeader.tsx +5 -1
- package/src/components/export.ts +2 -2
- package/src/stories/DesignSystem/typography.stories.tsx +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@campxdev/react-blueprint",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"main": "./export.ts",
|
|
5
5
|
"private": false,
|
|
6
6
|
"dependencies": {
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"react-dom": "^18.3.1",
|
|
31
31
|
"react-error-boundary": "^3.1.4",
|
|
32
32
|
"react-joyride": "^2.8.2",
|
|
33
|
+
"react-query": "^3.39.3",
|
|
33
34
|
"react-router-dom": "^6.24.0",
|
|
34
35
|
"react-scripts": "^5.0.1",
|
|
35
36
|
"recharts": "^2.12.7",
|
package/public/index.html
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!
|
|
1
|
+
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8" />
|
|
@@ -50,5 +50,29 @@
|
|
|
50
50
|
To begin the development, run `npm start` or `yarn start`.
|
|
51
51
|
To create a production bundle, use `npm run build` or `yarn build`.
|
|
52
52
|
-->
|
|
53
|
+
|
|
54
|
+
<script
|
|
55
|
+
type="text/javascript"
|
|
56
|
+
src="https://campx.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-T/278rlr/b/9/c95134bc67d3a521bb3f4331beb9b804/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-GB&collectorId=82a807ed"
|
|
57
|
+
></script>
|
|
58
|
+
|
|
59
|
+
<script type="text/javascript">
|
|
60
|
+
console.log(window, "window");
|
|
61
|
+
$(document).ready(function () {
|
|
62
|
+
window.ATL_JQ_PAGE_PROPS = {
|
|
63
|
+
triggerFunction: function (showCollectorDialog) {
|
|
64
|
+
var intId = setInterval(function () {
|
|
65
|
+
if ($("#jiraIssueCollector").length > 0) {
|
|
66
|
+
jQuery("#jiraIssueCollector").click(function (e) {
|
|
67
|
+
e.preventDefault();
|
|
68
|
+
showCollectorDialog();
|
|
69
|
+
});
|
|
70
|
+
clearInterval(intId);
|
|
71
|
+
}
|
|
72
|
+
}, 500);
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
});
|
|
76
|
+
</script>
|
|
53
77
|
</body>
|
|
54
78
|
</html>
|
package/src/App.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./App.css";
|
|
2
|
-
import { AppHeader } from "./components/export";
|
|
2
|
+
import { AppHeader, Button, UnAuthorized } from "./components/export";
|
|
3
3
|
import Providers from "./contexts/Providers";
|
|
4
4
|
|
|
5
5
|
function App() {
|
|
@@ -12,6 +12,13 @@ function App() {
|
|
|
12
12
|
collapsed={false}
|
|
13
13
|
institutionsData={[]}
|
|
14
14
|
/>
|
|
15
|
+
<UnAuthorized
|
|
16
|
+
component={
|
|
17
|
+
<Button sx={{ marginTop: "20px" }} variant="contained">
|
|
18
|
+
Click Here to Login
|
|
19
|
+
</Button>
|
|
20
|
+
}
|
|
21
|
+
/>
|
|
15
22
|
</Providers>
|
|
16
23
|
);
|
|
17
24
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { useQuery } from "react-query";
|
|
2
|
+
import { AppHeader } from "./components/export";
|
|
3
|
+
import { campxAxios } from "./utils/campxAxios";
|
|
4
|
+
|
|
5
|
+
const fetchClubRequests = () => {
|
|
6
|
+
return campxAxios.get(`/square/clubs`).then((res) => res.data);
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
function AppContent() {
|
|
10
|
+
const {
|
|
11
|
+
data: requests,
|
|
12
|
+
isLoading,
|
|
13
|
+
error,
|
|
14
|
+
refetch,
|
|
15
|
+
} = useQuery("club-requests", fetchClubRequests);
|
|
16
|
+
|
|
17
|
+
if (isLoading) {
|
|
18
|
+
return <div>Loading...</div>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
if (error) {
|
|
22
|
+
// No need to handle the error locally, it will be caught by ErrorBoundary
|
|
23
|
+
console.error("Error fetching club requests:", error);
|
|
24
|
+
throw error; // Re-throw the error to be caught by the ErrorBoundary
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<AppHeader
|
|
29
|
+
clientName="Anurag University"
|
|
30
|
+
actions={[<p>Actions here</p>]}
|
|
31
|
+
userFullName="Srikanth Yellapragada"
|
|
32
|
+
collapsed={false}
|
|
33
|
+
institutionsData={[]}
|
|
34
|
+
/>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export default AppContent;
|