@asaleh37/ui-base 25.6.19-1 → 25.6.19-3
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/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -7
- package/src/components/common/Home.tsx +1 -2
- package/src/components/common/MyNotificationsPanel.tsx +0 -1
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/TemplateForm.tsx +0 -1
- package/src/components/templates/report/ExcelReportViewer.tsx +1 -2
- package/src/components/templates/report/ReportViewer.tsx +1 -2
- package/src/layout/NavigationTree.tsx +4 -2
- package/src/layout/TopBar.tsx +1 -3
- package/vite.config.ts +14 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@asaleh37/ui-base",
|
|
3
|
-
"version": "25.6.19-
|
|
3
|
+
"version": "25.6.19-3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "Ahmed Saleh Mohamed",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@types/react-dom": "^19.0.3",
|
|
42
42
|
"@types/react-i18next": "^7.8.3",
|
|
43
43
|
"@vitejs/plugin-react": "^4.3.4",
|
|
44
|
-
"axios": "^1.8.1",
|
|
44
|
+
"axios": "^1.8.1",
|
|
45
45
|
"eslint": "^9.19.0",
|
|
46
46
|
"eslint-plugin-react-hooks": "^5.0.0",
|
|
47
47
|
"eslint-plugin-react-refresh": "^0.4.18",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"moment": "^2.30.1",
|
|
54
54
|
"oidc-client-ts": "^3.1.0",
|
|
55
55
|
"react": "^19.1.0",
|
|
56
|
-
"react-dom": "^19.0.0",
|
|
56
|
+
"react-dom": "^19.0.0",
|
|
57
57
|
"react-hook-form": "^7.54.2",
|
|
58
58
|
"react-i18next": "^15.4.0",
|
|
59
59
|
"react-redux": "^9.2.0",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"@mui/x-tree-view": "^7.26.0",
|
|
93
93
|
"@react-spring/web": "^9.7.5",
|
|
94
94
|
"@reduxjs/toolkit": "^2.5.1",
|
|
95
|
-
"axios": "^1.8.1",
|
|
95
|
+
"axios": "^1.8.1",
|
|
96
96
|
"global": "^4.4.0",
|
|
97
97
|
"i18next": "^24.2.2",
|
|
98
98
|
"i18next-browser-languagedetector": "^8.0.3",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"moment": "^2.30.1",
|
|
101
101
|
"oidc-client-ts": "^3.1.0",
|
|
102
102
|
"react": "^19.0.0",
|
|
103
|
-
"react-dom": "^19.0.0",
|
|
103
|
+
"react-dom": "^19.0.0",
|
|
104
104
|
"react-hook-form": "^7.54.2",
|
|
105
105
|
"react-i18next": "^15.4.0",
|
|
106
106
|
"react-redux": "^9.2.0",
|
|
@@ -113,7 +113,8 @@
|
|
|
113
113
|
"stylis-plugin-rtl": "^2.1.1",
|
|
114
114
|
"zod": "^3.24.2"
|
|
115
115
|
},
|
|
116
|
-
"dependencies": {
|
|
117
|
-
"@rollup/plugin-json": "^6.1.0"
|
|
116
|
+
"dependencies": {
|
|
117
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
118
|
+
"rollup-plugin-terser": "^7.0.2"
|
|
118
119
|
}
|
|
119
120
|
}
|
|
@@ -8,8 +8,7 @@ import AttachmentPanel from "../templates/attachment/AttachmentPanel";
|
|
|
8
8
|
import { useSelector } from "react-redux";
|
|
9
9
|
|
|
10
10
|
const Home: React.FC = () => {
|
|
11
|
-
const AppInfo = useSelector((state: any) => state.AppInfo.value);
|
|
12
|
-
console.log("AppInfo", AppInfo);
|
|
11
|
+
const AppInfo = useSelector((state: any) => state.AppInfo.value);
|
|
13
12
|
return (
|
|
14
13
|
<Box
|
|
15
14
|
sx={{
|
|
@@ -186,8 +186,7 @@ const ReportViewer: React.FC<ReportViewerProps> = (props) => {
|
|
|
186
186
|
// Clean up
|
|
187
187
|
document.body.removeChild(link);
|
|
188
188
|
window.URL.revokeObjectURL(url);
|
|
189
|
-
}
|
|
190
|
-
console.log(response);
|
|
189
|
+
}
|
|
191
190
|
},
|
|
192
191
|
failureCallBkFn: (response) => {
|
|
193
192
|
setErrorMessage(
|
|
@@ -235,7 +235,9 @@ export default function NavigationTree() {
|
|
|
235
235
|
const dispatch = useDispatch();
|
|
236
236
|
const isMobile = useIsMobile();
|
|
237
237
|
const { isUserAuthorized } = useSession();
|
|
238
|
+
debugger;
|
|
238
239
|
const filterData = (data) => {
|
|
240
|
+
console.log("filterDate", data);
|
|
239
241
|
return data
|
|
240
242
|
.filter(
|
|
241
243
|
(item: any) =>
|
|
@@ -244,8 +246,8 @@ export default function NavigationTree() {
|
|
|
244
246
|
isUserAuthorized(item.authority)
|
|
245
247
|
)
|
|
246
248
|
.map((item: any) => {
|
|
247
|
-
if (item
|
|
248
|
-
item.children = filterData(item
|
|
249
|
+
if (item?.children) {
|
|
250
|
+
item.children = filterData(item?.children || []);
|
|
249
251
|
}
|
|
250
252
|
return item;
|
|
251
253
|
});
|
package/src/layout/TopBar.tsx
CHANGED
|
@@ -80,9 +80,7 @@ const TopBar: React.FC = () => {
|
|
|
80
80
|
const handleLogout = async () => {
|
|
81
81
|
try {
|
|
82
82
|
await handleGetRequest({ endPointURI: "api/auth/logout" });
|
|
83
|
-
} catch (error) {
|
|
84
|
-
console.log("logout error", error);
|
|
85
|
-
}
|
|
83
|
+
} catch (error) {}
|
|
86
84
|
dispatch(UserSessionActions.setUnAuthenticated());
|
|
87
85
|
};
|
|
88
86
|
const toggleSideBar = () => {
|
package/vite.config.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { defineConfig } from "vite";
|
|
|
2
2
|
import react from "@vitejs/plugin-react";
|
|
3
3
|
import rollupNodePolyFill from "rollup-plugin-polyfill-node";
|
|
4
4
|
import inject from "@rollup/plugin-inject";
|
|
5
|
+
import { terser } from "rollup-plugin-terser";
|
|
5
6
|
|
|
6
7
|
// https://vite.dev/config/
|
|
7
8
|
export default defineConfig({
|
|
@@ -13,8 +14,20 @@ export default defineConfig({
|
|
|
13
14
|
include: ["fbjs"],
|
|
14
15
|
},
|
|
15
16
|
build: {
|
|
17
|
+
minify: false,
|
|
16
18
|
rollupOptions: {
|
|
17
|
-
plugins: [
|
|
19
|
+
plugins: [
|
|
20
|
+
rollupNodePolyFill(),
|
|
21
|
+
terser({
|
|
22
|
+
compress: {
|
|
23
|
+
drop_debugger: false,
|
|
24
|
+
drop_console: false,
|
|
25
|
+
},
|
|
26
|
+
format: {
|
|
27
|
+
comments: false,
|
|
28
|
+
},
|
|
29
|
+
}),
|
|
30
|
+
],
|
|
18
31
|
},
|
|
19
32
|
},
|
|
20
33
|
server: {
|