@galadrim/galadmin 0.0.56 → 0.0.60
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/README.md +11 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/config.d.ts +4 -1
- package/package.json +1 -1
- package/src/front/build/asset-manifest.json +7 -7
- package/src/front/build/index.html +1 -1
- package/src/front/build/static/js/2.88bb9cea.chunk.js +3 -0
- package/src/front/build/static/js/{2.a36e796c.chunk.js.LICENSE.txt → 2.88bb9cea.chunk.js.LICENSE.txt} +0 -0
- package/src/front/build/static/js/2.88bb9cea.chunk.js.map +1 -0
- package/src/front/build/static/js/main.73e3ab10.chunk.js +2 -0
- package/src/front/build/static/js/main.73e3ab10.chunk.js.map +1 -0
- package/src/front/node_modules/.cache/.eslintcache +1 -1
- package/src/front/node_modules/.cache/babel-loader/4b3b5abfa752c54455d4121d45617b4c.json +1 -0
- package/src/front/node_modules/.cache/babel-loader/cd53713ec61cb5f5e41e728d0d93a34d.json +1 -0
- package/src/front/node_modules/.cache/babel-loader/f4b762bafa9d1a3fcfbe0c8e214442c1.json +1 -0
- package/src/front/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/02/1c/cd922a30b837866c304e653fd02dc10a713290b65b1a3f8ab96fac6e8d3d8153afdd05cd2f39ac5a2b666bbc7c16e0a5a909a50abc0640d631f50f2d5405 +1 -0
- package/src/front/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/73/e0/e8f746f6508eb2e7534038851a58d3b228e588ca7c77240d21c639442c22bf565ec58db5e517961948299aafea96b4098933f321439294e0d0e8a4d6ba8a +1 -0
- package/src/front/node_modules/.cache/terser-webpack-plugin/index-v5/{89/0b/0288e44a6ea8f1f576183f8eaddfd813aa921af4ba454a7841d4dca8315d → 2b/71/73dcec954db0a53053ac1407937501fbc41ed0fdbd71c9429ea265937a26} +1 -1
- package/src/front/node_modules/.cache/terser-webpack-plugin/index-v5/{36/24/c00eb98248fe79df72f85094ec47404188b5b9bcddb33765321a2cd0f2cf → 32/f1/8264252bcf7c4f98cde13450968b415f55003188f30504894efa85c8e42b} +1 -1
- package/src/front/node_modules/.cache/terser-webpack-plugin/index-v5/3b/6d/4bfed5b8d4522c713b88981d22cf3a01c8070de081205f08d72bde2b624d +1 -1
- package/src/front/node_modules/.cache/terser-webpack-plugin/index-v5/85/32/ce21c9eaef2611fd4fb33689a361ba60bbae4c7f2eaf10a151709b9d4d08 +1 -1
- package/src/front/node_modules/.cache/terser-webpack-plugin/index-v5/87/08/421190bfe6e50816e059da6c33526c9943732ef856ebd2752d0cbfb4a852 +1 -1
- package/src/front/src/App.js +5 -1
- package/src/front/src/components/RedirectToFirstView.js +24 -0
- package/src/front/src/pages/CreateRecord.js +5 -1
- package/src/types/config.ts +6 -1
- package/src/front/build/static/js/2.a36e796c.chunk.js +0 -3
- package/src/front/build/static/js/2.a36e796c.chunk.js.map +0 -1
- package/src/front/build/static/js/main.6ea0ec11.chunk.js +0 -2
- package/src/front/build/static/js/main.6ea0ec11.chunk.js.map +0 -1
- package/src/front/node_modules/.cache/babel-loader/01481a0326bb4d10d7fbf09112189b69.json +0 -1
- package/src/front/node_modules/.cache/babel-loader/0f7b4f29f84916ad60dad5d618d38d0f.json +0 -1
- package/src/front/node_modules/.cache/babel-loader/bc29475dc0c7d230b3a90bafa0f6db35.json +0 -1
- package/src/front/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/2b/82/e9b727a2449cc6e111c67a06de0af8423807ce8e322bff1af03dbdc1444c2762b43296d5d56289531ae9a6d4629f0487b77318120e4f639a0aa031b9665a +0 -1
- package/src/front/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/40/d3/73dd582bfa224c9cdb6ae66f5209ca58eb21216dbb6184fd38b21f9c31de01ca82a4a6af69d51cf46601043d0b9cee8c89bb01c02f5359e347d87ce45371 +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
275779b627cf923d0a4f2734660d4cbed9e17596 {"key":"{\"terser\":\"5.7.1\",\"terser-webpack-plugin\":\"4.2.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.[cm]?js(\\\\?.*)?$\", \"i\"),\"extractComments\":true,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"parse\":{\"ecma\":8},\"compress\":{\"ecma\":5,\"warnings\":false,\"comparisons\":false,\"inline\":2},\"mangle\":{\"safari10\":true},\"keep_classnames\":false,\"keep_fnames\":false,\"output\":{\"ecma\":5,\"comments\":false,\"ascii_only\":true},\"ecma\":5}},\"name\":\"static\\u002Fjs\\u002Fmain.73e3ab10.chunk.js\",\"contentHash\":\"f0071eb298dd9d4fb3e6\"}","integrity":"sha512-c+Do90b2UI6y51NAOIUaWNOyKOWIynx3JA0hxjlELCK/Vl7FjbXlF5YZSCmar+qWtAmJM/MhQ5KU4NDopNa6ig==","time":1640165844597,"size":335207}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
11d10e5aff5044f5c6865ca67d7fbb4669fe6729 {"key":"{\"terser\":\"5.7.1\",\"terser-webpack-plugin\":\"4.2.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.[cm]?js(\\\\?.*)?$\", \"i\"),\"extractComments\":true,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"parse\":{\"ecma\":8},\"compress\":{\"ecma\":5,\"warnings\":false,\"comparisons\":false,\"inline\":2},\"mangle\":{\"safari10\":true},\"keep_classnames\":false,\"keep_fnames\":false,\"output\":{\"ecma\":5,\"comments\":false,\"ascii_only\":true},\"ecma\":5}},\"name\":\"static\\u002Fjs\\u002F2.88bb9cea.chunk.js\",\"contentHash\":\"01567565c347bca09e20\"}","integrity":"sha512-AhzNkiowuDeGbDBOZT/QLcEKcTKQtlsaP4q5b6xujT2BU6/dBc0vOaxaK2ZrvHwW4KWpCaUKvAZA1jH1Dy1UBQ==","time":1640165848041,"size":1866754}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
9cf0418dac6178aee39190dab670fc1d911d27b3 {"key":"{\"terser\":\"5.7.1\",\"terser-webpack-plugin\":\"4.2.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.[cm]?js(\\\\?.*)?$\", \"i\"),\"extractComments\":true,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"parse\":{\"ecma\":8},\"compress\":{\"ecma\":5,\"warnings\":false,\"comparisons\":false,\"inline\":2},\"mangle\":{\"safari10\":true},\"keep_classnames\":false,\"keep_fnames\":false,\"output\":{\"ecma\":5,\"comments\":false,\"ascii_only\":true},\"ecma\":5}},\"name\":\"static\\u002Fjs\\u002F2.a36e796c.chunk.js\",\"contentHash\":\"4352852219d257201775\"}","integrity":"sha512-donmDCnp0J/iv+TWTuiBTgFp2KdqP6CLMt7hXVq0VN/d1RyH3hDGuTXDuJ3ddYqLkQW6Tr0WouFMrZ+s5FT1zg==","time":1639995094971,"size":1863793}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
e10e87ad399f801a06782eea067b632c70cd7ca4 {"key":"{\"terser\":\"5.7.1\",\"terser-webpack-plugin\":\"4.2.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.[cm]?js(\\\\?.*)?$\", \"i\"),\"extractComments\":true,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"parse\":{\"ecma\":8},\"compress\":{\"ecma\":5,\"warnings\":false,\"comparisons\":false,\"inline\":2},\"mangle\":{\"safari10\":true},\"keep_classnames\":false,\"keep_fnames\":false,\"output\":{\"ecma\":5,\"comments\":false,\"ascii_only\":true},\"ecma\":5}},\"name\":\"static\\u002Fjs\\u002Fmain.6ea0ec11.chunk.js\",\"contentHash\":\"54393fc03feaf1b47b07\"}","integrity":"sha512-gvyN8DNzqA1Nidpc2tjCgBZ4Kc/3t1KtcfUXUfNA9/0K6O0MYOYIpB93J+PgneGtqQDr5eIT5AeRZxBcUyk+0g==","time":1639995091589,"size":331696}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
92e4716997dda5b4d159ebb6f672269d3c81bab9 {"key":"{\"terser\":\"5.7.1\",\"terser-webpack-plugin\":\"4.2.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.[cm]?js(\\\\?.*)?$\", \"i\"),\"extractComments\":true,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"parse\":{\"ecma\":8},\"compress\":{\"ecma\":5,\"warnings\":false,\"comparisons\":false,\"inline\":2},\"mangle\":{\"safari10\":true},\"keep_classnames\":false,\"keep_fnames\":false,\"output\":{\"ecma\":5,\"comments\":false,\"ascii_only\":true},\"ecma\":5}},\"name\":\"static\\u002Fjs\\u002Fruntime-main.2084140f.js\",\"contentHash\":\"21b0955fafaa36835c2c\"}","integrity":"sha512-EIHWkk+Hu8omZttNSZyf/dcQREufSs8WYrDS8rrnA4aKRWlIARB00JVPiR1DRsuEMh2l+YSkkh+tpa2nXovJ6g==","time":1639995091640,"size":17514}
|
package/src/front/src/App.js
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
import { useEffect, useState } from "react";
|
|
7
7
|
import './App.css';
|
|
8
8
|
import Sidebar from './components/Sidebar'
|
|
9
|
+
import RedirectToFirstView from './components/RedirectToFirstView'
|
|
9
10
|
import CreateRecord from './pages/CreateRecord'
|
|
10
11
|
import EditRecord from './pages/EditRecord'
|
|
11
12
|
import Records from './pages/Records'
|
|
@@ -17,7 +18,7 @@ import { ConfigProvider } from './contexts/ConfigContext'
|
|
|
17
18
|
import axios from "axios";
|
|
18
19
|
|
|
19
20
|
axios.defaults.withCredentials = true;
|
|
20
|
-
axios.defaults.baseURL = process.env.NODE_ENV === "development" ? 'http://localhost
|
|
21
|
+
axios.defaults.baseURL = process.env.NODE_ENV === "development" ? 'http://localhost/admin/api' : '/_HOMEPAGE_/api';
|
|
21
22
|
|
|
22
23
|
function App() {
|
|
23
24
|
const [isAuthenticated, setIsAuthenticated] = useState(null);
|
|
@@ -53,6 +54,9 @@ function App() {
|
|
|
53
54
|
<Route path="/customView/:viewIndex">
|
|
54
55
|
<CustomView />
|
|
55
56
|
</Route>
|
|
57
|
+
<Route path="/">
|
|
58
|
+
<RedirectToFirstView />
|
|
59
|
+
</Route>
|
|
56
60
|
</Switch>
|
|
57
61
|
</Router>
|
|
58
62
|
</ConfigProvider>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useContext } from "react"
|
|
2
|
+
import {
|
|
3
|
+
Redirect
|
|
4
|
+
} from "react-router-dom";
|
|
5
|
+
import { ConfigContext } from '../contexts/ConfigContext'
|
|
6
|
+
|
|
7
|
+
export default () => {
|
|
8
|
+
const config = useContext(ConfigContext)
|
|
9
|
+
const firstView = config.views[0]
|
|
10
|
+
|
|
11
|
+
if (!firstView) {
|
|
12
|
+
return null
|
|
13
|
+
}
|
|
14
|
+
if (firstView.type === "table") {
|
|
15
|
+
return <Redirect to="/records/0" />
|
|
16
|
+
}
|
|
17
|
+
if (firstView.type === "iframe") {
|
|
18
|
+
return <Redirect to="/iframe/0" />
|
|
19
|
+
}
|
|
20
|
+
if (firstView.type === "custom") {
|
|
21
|
+
return <Redirect to="/customView/0" />
|
|
22
|
+
}
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
@@ -49,7 +49,11 @@ export default () => {
|
|
|
49
49
|
data: data.current
|
|
50
50
|
})
|
|
51
51
|
setIsCreating(false)
|
|
52
|
-
|
|
52
|
+
if (recordId) {
|
|
53
|
+
history.push(`/record/${viewIndex}/${recordId}`)
|
|
54
|
+
} else {
|
|
55
|
+
history.push(`/records/${viewIndex}`)
|
|
56
|
+
}
|
|
53
57
|
} catch (error) {
|
|
54
58
|
if (error.response.responseText) {
|
|
55
59
|
window.swal({
|
package/src/types/config.ts
CHANGED
|
@@ -224,7 +224,12 @@ export type CustomView = {
|
|
|
224
224
|
componentPath: string
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
export type
|
|
227
|
+
export type BaseTypeView = {
|
|
228
|
+
/** Cache la vue dans le menu latéral */
|
|
229
|
+
hidden?: boolean
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export type View = BaseTypeView & (TableView | IframeView | LinkView | CustomView)
|
|
228
233
|
|
|
229
234
|
export type Config = {
|
|
230
235
|
/** Nom du projet */
|