@applica-software-guru/react-admin 1.5.349 → 1.5.350
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/components/ra-inputs/ReferenceLookupInput/ReferenceLookupInput.d.ts +1 -0
- package/dist/components/ra-inputs/ReferenceLookupInput/ReferenceLookupInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/ReferenceLookupInput/ReferenceManyLookupInput.d.ts +1 -0
- package/dist/components/ra-inputs/ReferenceLookupInput/ReferenceManyLookupInput.d.ts.map +1 -1
- package/dist/react-admin.cjs.js.map +1 -1
- package/dist/react-admin.es.js.map +1 -1
- package/dist/react-admin.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ra-inputs/ReferenceLookupInput/ReferenceLookupInput.tsx +1 -0
- package/src/components/ra-inputs/ReferenceLookupInput/ReferenceManyLookupInput.tsx +1 -0
- package/src/playground/App.jsx +5 -4
- package/src/playground/components/ra-forms/TempForm.jsx +26 -0
- package/src/playground/components/ra-forms/index.jsx +1 -0
- package/src/playground/components/ra-lists/TempList.jsx +13 -0
- package/src/playground/components/ra-lists/index.jsx +1 -0
- package/src/playground/entities/index.jsx +1 -0
- package/src/playground/entities/temp.jsx +25 -0
- package/src/playground/entities/user.jsx +2 -2
- package/src/playground/menu.jsx +7 -0
package/package.json
CHANGED
package/src/playground/App.jsx
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import * as entities from './entities';
|
|
2
|
-
import { menu } from './menu';
|
|
3
|
-
import { theme } from './theme';
|
|
4
1
|
import { ActivatePage, ApplicaAdmin, HttpError, RecoverPage, RegisterPage, Resource } from '@/';
|
|
2
|
+
import { createI18nProvider, createJsonI18nProvider } from '@/i18n';
|
|
5
3
|
import build from '@/playground/build.json';
|
|
6
4
|
import { CustomPage, TestWizardForm } from '@/playground/components';
|
|
7
5
|
import { API_URL, APP_NAME } from '@/playground/config';
|
|
@@ -9,7 +7,9 @@ import { ApplicaDataProvider, createAttachmentsParser } from '@applica-software-
|
|
|
9
7
|
import { ApplicaAuthProvider, LocalStorage } from '@applica-software-guru/iam-client';
|
|
10
8
|
import { CustomRoutes } from 'ra-core';
|
|
11
9
|
import { Route } from 'react-router-dom';
|
|
12
|
-
import
|
|
10
|
+
import * as entities from './entities';
|
|
11
|
+
import { menu } from './menu';
|
|
12
|
+
import { theme } from './theme';
|
|
13
13
|
|
|
14
14
|
const authProvider = new ApplicaAuthProvider(API_URL, new LocalStorage());
|
|
15
15
|
const dataProvider = new ApplicaDataProvider({
|
|
@@ -65,6 +65,7 @@ function App() {
|
|
|
65
65
|
<Resource name="entities/i18n-message" {...entities.i18nMessage} />
|
|
66
66
|
<Resource name="entities/device" {...entities.device} />
|
|
67
67
|
<Resource name="entities/category" {...entities.category} />
|
|
68
|
+
<Resource name="entities/temp" {...entities.temp} />
|
|
68
69
|
<CustomRoutes noLayout>
|
|
69
70
|
<Route path="/register" element={<RegisterPage name={APP_NAME} copy="Test" version={build.version} />} />
|
|
70
71
|
<Route path="/recover" element={<RecoverPage name={APP_NAME} copy="Test" version={build.version} />} />
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ReferenceLookupInput, ReferenceManyLookupInput, TextField } from '@/components';
|
|
2
|
+
import { TextInput, useThemeConfig } from '@applica-software-guru/react-admin';
|
|
3
|
+
import { Grid } from '@mui/material';
|
|
4
|
+
import { useRecordContext } from 'ra-core';
|
|
5
|
+
import { SimpleForm } from 'ra-ui-materialui';
|
|
6
|
+
|
|
7
|
+
function TempForm({ roles }) {
|
|
8
|
+
const { spacing } = useThemeConfig();
|
|
9
|
+
const record = useRecordContext();
|
|
10
|
+
return (
|
|
11
|
+
<SimpleForm defaultValues={{ active: true }}>
|
|
12
|
+
<Grid container spacing={spacing}>
|
|
13
|
+
<Grid item lg={6} xs={12}>
|
|
14
|
+
<TextInput fullWidth source="description" />
|
|
15
|
+
<ReferenceLookupInput fullWidth source="userId" reference="entities/user" />
|
|
16
|
+
<ReferenceManyLookupInput fullWidth source="userIds" reference="entities/user">
|
|
17
|
+
<TextField source="name" />
|
|
18
|
+
<TextField source="email" />
|
|
19
|
+
</ReferenceManyLookupInput>
|
|
20
|
+
</Grid>
|
|
21
|
+
</Grid>
|
|
22
|
+
</SimpleForm>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { TempForm };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Datagrid, List, SearchInput, TextField } from '@applica-software-guru/react-admin';
|
|
2
|
+
|
|
3
|
+
function TempList() {
|
|
4
|
+
return (
|
|
5
|
+
<List perPage={25} filters={[<SearchInput key="keyword" source="keyword" alwaysOn fullWidth />]}>
|
|
6
|
+
<Datagrid rowClick="edit">
|
|
7
|
+
<TextField source="description" />
|
|
8
|
+
</Datagrid>
|
|
9
|
+
</List>
|
|
10
|
+
);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { TempList };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { TempForm, TempList } from '@/playground/components';
|
|
2
|
+
import { Create, Edit } from '@applica-software-guru/react-admin';
|
|
3
|
+
|
|
4
|
+
function TempCreate() {
|
|
5
|
+
return (
|
|
6
|
+
<Create>
|
|
7
|
+
<TempForm />
|
|
8
|
+
</Create>
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
function TempEdit() {
|
|
12
|
+
return (
|
|
13
|
+
<Edit mutationMode="pessimistic">
|
|
14
|
+
<TempForm />
|
|
15
|
+
</Edit>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
export const temp = {
|
|
19
|
+
list: <TempList />,
|
|
20
|
+
edit: TempEdit,
|
|
21
|
+
create: TempCreate,
|
|
22
|
+
options: {
|
|
23
|
+
group: 'control-panel'
|
|
24
|
+
}
|
|
25
|
+
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { UserForm, UserList } from '@/playground/components';
|
|
2
2
|
import { ROLES } from '@/playground/config';
|
|
3
|
-
import { UserOutlined } from '@ant-design/icons';
|
|
4
3
|
import { Create, Edit } from '@applica-software-guru/react-admin';
|
|
5
4
|
|
|
6
5
|
function UserCreate() {
|
|
@@ -23,5 +22,6 @@ export const user = {
|
|
|
23
22
|
create: UserCreate,
|
|
24
23
|
options: {
|
|
25
24
|
group: 'control-panel'
|
|
26
|
-
}
|
|
25
|
+
},
|
|
26
|
+
recordRepresentation: (record) => record?.name ?? record?.mail ?? record?.id
|
|
27
27
|
};
|
package/src/playground/menu.jsx
CHANGED