@asaleh37/ui-base 1.1.0 → 1.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.
- package/dist/index.d.ts +9 -3
- package/dist/index.js +31 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +31 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +28 -25
- package/rollup.config-1748377725725.cjs +50 -0
- package/rollup.config.js +38 -36
- package/src/components/App.tsx +10 -6
- package/src/components/BaseApp.tsx +4 -4
- package/src/styles/index.css +1 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@asaleh37/ui-base",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "Ahmed Saleh Mohamed",
|
|
@@ -13,31 +13,10 @@
|
|
|
13
13
|
"dev": "vite"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@rollup/plugin-commonjs": "^28.0.3",
|
|
17
|
-
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
18
|
-
"@rollup/plugin-terser": "^0.4.4",
|
|
19
|
-
"@rollup/plugin-typescript": "^12.1.2",
|
|
20
|
-
"@types/react": "^19.1.6",
|
|
21
|
-
"react": "^19.1.0",
|
|
22
|
-
"rollup-plugin-dts": "^6.2.1",
|
|
23
|
-
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
24
|
-
"tslib": "^2.8.1",
|
|
25
|
-
"@eslint/js": "^9.19.0",
|
|
26
|
-
"@types/react-dom": "^19.0.3",
|
|
27
|
-
"@types/react-i18next": "^7.8.3",
|
|
28
|
-
"@vitejs/plugin-react": "^4.3.4",
|
|
29
|
-
"eslint": "^9.19.0",
|
|
30
|
-
"eslint-plugin-react-hooks": "^5.0.0",
|
|
31
|
-
"eslint-plugin-react-refresh": "^0.4.18",
|
|
32
|
-
"globals": "^15.14.0",
|
|
33
|
-
"typescript": "~5.7.2",
|
|
34
|
-
"typescript-eslint": "^8.22.0",
|
|
35
|
-
"vite": "^6.1.0",
|
|
36
|
-
"rollup": "^4.41.1",
|
|
37
|
-
"rollup-plugin-postcss": "^4.0.2",
|
|
38
16
|
"@emotion/cache": "^11.14.0",
|
|
39
17
|
"@emotion/react": "^11.14.0",
|
|
40
18
|
"@emotion/styled": "^11.14.0",
|
|
19
|
+
"@eslint/js": "^9.19.0",
|
|
41
20
|
"@fortawesome/fontawesome-svg-core": "^6.7.2",
|
|
42
21
|
"@fortawesome/free-brands-svg-icons": "^6.7.2",
|
|
43
22
|
"@fortawesome/free-regular-svg-icons": "^6.7.2",
|
|
@@ -53,25 +32,44 @@
|
|
|
53
32
|
"@mui/x-tree-view": "^7.26.0",
|
|
54
33
|
"@react-spring/web": "^9.7.5",
|
|
55
34
|
"@reduxjs/toolkit": "^2.5.1",
|
|
35
|
+
"@rollup/plugin-commonjs": "^28.0.3",
|
|
36
|
+
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
37
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
38
|
+
"@rollup/plugin-typescript": "^12.1.2",
|
|
39
|
+
"@types/react": "^19.1.6",
|
|
40
|
+
"@types/react-dom": "^19.0.3",
|
|
41
|
+
"@types/react-i18next": "^7.8.3",
|
|
42
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
56
43
|
"axios": "^1.8.1",
|
|
44
|
+
"eslint": "^9.19.0",
|
|
45
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
46
|
+
"eslint-plugin-react-refresh": "^0.4.18",
|
|
47
|
+
"globals": "^15.14.0",
|
|
57
48
|
"i18next": "^24.2.2",
|
|
58
49
|
"i18next-browser-languagedetector": "^8.0.3",
|
|
59
50
|
"i18next-http-backend": "^3.0.2",
|
|
60
51
|
"moment": "^2.30.1",
|
|
61
52
|
"oidc-client-ts": "^3.1.0",
|
|
53
|
+
"react": "^19.1.0",
|
|
62
54
|
"react-dom": "^19.0.0",
|
|
63
55
|
"react-hook-form": "^7.54.2",
|
|
64
56
|
"react-i18next": "^15.4.0",
|
|
65
57
|
"react-redux": "^9.2.0",
|
|
66
58
|
"react-router-dom": "^7.1.5",
|
|
67
59
|
"react-toastify": "^11.0.5",
|
|
60
|
+
"rollup": "^4.41.1",
|
|
61
|
+
"rollup-plugin-dts": "^6.2.1",
|
|
62
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
63
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
68
64
|
"stylis": "^4.3.6",
|
|
69
65
|
"stylis-plugin-rtl": "^2.1.1",
|
|
66
|
+
"tslib": "^2.8.1",
|
|
67
|
+
"typescript": "~5.7.2",
|
|
68
|
+
"typescript-eslint": "^8.22.0",
|
|
69
|
+
"vite": "^6.1.0",
|
|
70
70
|
"zod": "^3.24.2"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
|
-
"rollup": "^4.41.1",
|
|
74
|
-
"rollup-plugin-postcss": "^4.0.2",
|
|
75
73
|
"@emotion/cache": "^11.14.0",
|
|
76
74
|
"@emotion/react": "^11.14.0",
|
|
77
75
|
"@emotion/styled": "^11.14.0",
|
|
@@ -103,8 +101,13 @@
|
|
|
103
101
|
"react-redux": "^9.2.0",
|
|
104
102
|
"react-router-dom": "^7.1.5",
|
|
105
103
|
"react-toastify": "^11.0.5",
|
|
104
|
+
"rollup": "^4.41.1",
|
|
105
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
106
106
|
"stylis": "^4.3.6",
|
|
107
107
|
"stylis-plugin-rtl": "^2.1.1",
|
|
108
108
|
"zod": "^3.24.2"
|
|
109
|
+
},
|
|
110
|
+
"dependencies": {
|
|
111
|
+
"@rollup/plugin-json": "^6.1.0"
|
|
109
112
|
}
|
|
110
113
|
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var resolve = require('@rollup/plugin-node-resolve');
|
|
6
|
+
var commonjs = require('@rollup/plugin-commonjs');
|
|
7
|
+
var typescript = require('@rollup/plugin-typescript');
|
|
8
|
+
var dts = require('rollup-plugin-dts');
|
|
9
|
+
var terser = require('@rollup/plugin-terser');
|
|
10
|
+
var json = require('@rollup/plugin-json');
|
|
11
|
+
var peerDepsExternal = require('rollup-plugin-peer-deps-external');
|
|
12
|
+
var postcss = require('rollup-plugin-postcss');
|
|
13
|
+
|
|
14
|
+
const packageJson = require("./package.json");
|
|
15
|
+
|
|
16
|
+
var rollup_config = [
|
|
17
|
+
{
|
|
18
|
+
input: "src/index.ts",
|
|
19
|
+
output: [
|
|
20
|
+
{
|
|
21
|
+
file: packageJson.main,
|
|
22
|
+
format: "cjs",
|
|
23
|
+
sourcemap: true,
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
file: packageJson.module,
|
|
27
|
+
format: "esm",
|
|
28
|
+
sourcemap: true,
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
plugins: [
|
|
32
|
+
peerDepsExternal(),
|
|
33
|
+
resolve(),
|
|
34
|
+
commonjs(),
|
|
35
|
+
typescript({ tsconfig: "./tsconfig.json" }),
|
|
36
|
+
terser(),
|
|
37
|
+
postcss(),
|
|
38
|
+
json(),
|
|
39
|
+
],
|
|
40
|
+
external: ["react", "react-dom"],
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
input: "src/index.ts",
|
|
44
|
+
output: [{ file: packageJson.types }],
|
|
45
|
+
plugins: [dts.default()],
|
|
46
|
+
external: [/\.css$/],
|
|
47
|
+
},
|
|
48
|
+
];
|
|
49
|
+
|
|
50
|
+
exports.default = rollup_config;
|
package/rollup.config.js
CHANGED
|
@@ -1,43 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import resolve from "@rollup/plugin-node-resolve";
|
|
2
|
+
import commonjs from "@rollup/plugin-commonjs";
|
|
3
|
+
import typescript from "@rollup/plugin-typescript";
|
|
4
|
+
import dts from "rollup-plugin-dts";
|
|
5
|
+
import terser from "@rollup/plugin-terser";
|
|
6
|
+
import json from "@rollup/plugin-json";
|
|
7
|
+
import peerDepsExternal from "rollup-plugin-peer-deps-external";
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
import postcss from "rollup-plugin-postcss";
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
const packageJson = require("./package.json");
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
export default [
|
|
14
|
+
{
|
|
15
|
+
input: "src/index.ts",
|
|
16
|
+
output: [
|
|
13
17
|
{
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
file: packageJson.main,
|
|
18
|
-
format: "cjs",
|
|
19
|
-
sourcemap: true,
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
file: packageJson.module,
|
|
23
|
-
format: "esm",
|
|
24
|
-
sourcemap: true,
|
|
25
|
-
},
|
|
26
|
-
],
|
|
27
|
-
plugins: [
|
|
28
|
-
peerDepsExternal(),
|
|
29
|
-
resolve(),
|
|
30
|
-
commonjs(),
|
|
31
|
-
typescript({ tsconfig: "./tsconfig.json" }),
|
|
32
|
-
terser(),
|
|
33
|
-
postcss(),
|
|
34
|
-
],
|
|
35
|
-
external: ["react", "react-dom"],
|
|
18
|
+
file: packageJson.main,
|
|
19
|
+
format: "cjs",
|
|
20
|
+
sourcemap: true,
|
|
36
21
|
},
|
|
37
22
|
{
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
external: [/\.css$/],
|
|
23
|
+
file: packageJson.module,
|
|
24
|
+
format: "esm",
|
|
25
|
+
sourcemap: true,
|
|
42
26
|
},
|
|
43
|
-
]
|
|
27
|
+
],
|
|
28
|
+
plugins: [
|
|
29
|
+
peerDepsExternal(),
|
|
30
|
+
resolve(),
|
|
31
|
+
commonjs(),
|
|
32
|
+
typescript({ tsconfig: "./tsconfig.json" }),
|
|
33
|
+
terser(),
|
|
34
|
+
postcss(),
|
|
35
|
+
json(),
|
|
36
|
+
],
|
|
37
|
+
external: ["react", "react-dom"],
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
input: "src/index.ts",
|
|
41
|
+
output: [{ file: packageJson.types }],
|
|
42
|
+
plugins: [dts.default()],
|
|
43
|
+
external: [/\.css$/],
|
|
44
|
+
},
|
|
45
|
+
];
|
package/src/components/App.tsx
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { useSelector } from "react-redux";
|
|
1
|
+
import { useDispatch, useSelector } from "react-redux";
|
|
2
2
|
import { createTheme } from "@mui/material";
|
|
3
3
|
import { ThemeProvider } from "@emotion/react";
|
|
4
|
-
import { useEffect } from "react";
|
|
4
|
+
import React, { useEffect } from "react";
|
|
5
5
|
import { RootState } from "../redux/store";
|
|
6
6
|
import { LightThemeOptions } from "../theme/LightThemeOptions";
|
|
7
7
|
import { DarkThemeOptions } from "../theme/DarkThemeOptions";
|
|
8
8
|
import Layout from "../layout/Layout";
|
|
9
|
+
import { AppInfo, AppInfoActions } from "../redux/features/common/AppInfoSlice";
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
const
|
|
11
|
+
const App: React.FC<AppInfo> = (props: AppInfo) => {
|
|
12
|
+
const dispatch = useDispatch();
|
|
12
13
|
const AppLayoutState = useSelector((state: RootState) => state.AppLayout);
|
|
13
14
|
let themeOptions = { ...LightThemeOptions };
|
|
14
15
|
if (AppLayoutState.themeMode === "dark") {
|
|
@@ -19,13 +20,16 @@ function App() {
|
|
|
19
20
|
...themeOptions,
|
|
20
21
|
});
|
|
21
22
|
useEffect(() => {
|
|
22
|
-
document.title =
|
|
23
|
+
document.title = props.documentTitle;
|
|
23
24
|
}, []);
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
dispatch(AppInfoActions.setAppInfo(props));
|
|
27
|
+
}, [props]);
|
|
24
28
|
return (
|
|
25
29
|
<ThemeProvider theme={theme}>
|
|
26
30
|
<Layout />
|
|
27
31
|
</ThemeProvider>
|
|
28
32
|
);
|
|
29
|
-
}
|
|
33
|
+
};
|
|
30
34
|
|
|
31
35
|
export default App;
|
|
@@ -11,17 +11,17 @@ LicenseInfo.setLicenseKey(
|
|
|
11
11
|
"c2bd611fa642666253500ab9c8e4f78fTz0xMTE4MjEsRT0xNzc2OTg4Nzk5MDAwLFM9cHJlbWl1bSxMTT1zdWJzY3JpcHRpb24sUFY9aW5pdGlhbCxLVj0y"
|
|
12
12
|
);
|
|
13
13
|
import "react-toastify/dist/ReactToastify.css";
|
|
14
|
+
import App from "./App";
|
|
15
|
+
import { AppInfo } from "../redux/features/common/AppInfoSlice";
|
|
14
16
|
|
|
15
17
|
library.add(fab);
|
|
16
18
|
library.add(far);
|
|
17
19
|
library.add(fas);
|
|
18
20
|
|
|
19
|
-
export
|
|
20
|
-
|
|
21
|
-
export const BaseApp: React.FC<BaseAppProps> = (props) => {
|
|
21
|
+
export const BaseApp: React.FC<AppInfo> = (props) => {
|
|
22
22
|
return (
|
|
23
23
|
<Provider store={store}>
|
|
24
|
-
<
|
|
24
|
+
<App {...props} />
|
|
25
25
|
</Provider>
|
|
26
26
|
);
|
|
27
27
|
};
|