@applica-software-guru/react-admin 1.1.85 → 1.1.87
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-forms/SimpleFormIterator.d.ts +2 -2
- package/dist/components/ra-forms/SimpleFormIterator.d.ts.map +1 -1
- package/dist/components/ra-inputs/ArrayInput.d.ts +4 -2
- package/dist/components/ra-inputs/ArrayInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/SelectInput.d.ts +8 -5
- package/dist/components/ra-inputs/SelectInput.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/react-admin.cjs.js +56 -59
- package/dist/react-admin.cjs.js.map +1 -1
- package/dist/react-admin.es.js +16082 -17815
- package/dist/react-admin.es.js.map +1 -1
- package/dist/react-admin.umd.js +57 -60
- package/dist/react-admin.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ra-forms/ChangePasswordForm.tsx +1 -1
- package/src/components/ra-forms/SimpleFormIterator.tsx +3 -3
- package/src/components/ra-inputs/ArrayInput.tsx +11 -7
- package/src/components/ra-inputs/{SelectInput.jsx → SelectInput.tsx} +5 -3
- package/src/index.jsx +3 -2
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@ import { Alert, AlertTitle, Grid } from '@mui/material';
|
|
|
2
2
|
import { EditContextProvider, ResourceContextProvider, required, useAuthProvider, useNotify, useTranslate } from 'ra-core';
|
|
3
3
|
import { useCallback, useState } from 'react';
|
|
4
4
|
|
|
5
|
-
import { SaveButton } from '
|
|
5
|
+
import { SaveButton } from 'react-admin';
|
|
6
6
|
import SimpleForm from './SimpleForm';
|
|
7
7
|
import { TextInput } from '../ra-inputs';
|
|
8
8
|
import { Toolbar } from '../ra-forms';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { SimpleFormIterator as RaSimpleFormIterator } from '
|
|
1
|
+
import { SimpleFormIterator as RaSimpleFormIterator } from 'react-admin';
|
|
2
2
|
import { styled } from '@mui/material/styles';
|
|
3
3
|
|
|
4
4
|
// @ts-ignore
|
|
5
|
-
|
|
5
|
+
const SimpleFormIterator = styled(RaSimpleFormIterator, {
|
|
6
6
|
name: 'ApplicaSimpleFormIterator',
|
|
7
7
|
root: 'root'
|
|
8
8
|
})(({ theme }) => ({
|
|
@@ -22,7 +22,7 @@ export const SimpleFormIterator = styled(RaSimpleFormIterator, {
|
|
|
22
22
|
position: 'relative',
|
|
23
23
|
overflow: 'visible',
|
|
24
24
|
transform: 'none',
|
|
25
|
-
|
|
25
|
+
marginLeft: 0
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
}));
|
|
@@ -7,9 +7,12 @@ const StyledArrayInput = styled(RaArrayInput, {
|
|
|
7
7
|
name: 'ApplicaArrayInput',
|
|
8
8
|
slot: 'root'
|
|
9
9
|
})(({ theme }) => ({
|
|
10
|
-
'& label
|
|
10
|
+
'& .MuiStack-root > label': {
|
|
11
11
|
marginTop: theme.spacing(2)
|
|
12
12
|
},
|
|
13
|
+
'& .MuiInputLabel-shrink': {
|
|
14
|
+
paddingBottom: 0
|
|
15
|
+
},
|
|
13
16
|
marginTop: '0 !important',
|
|
14
17
|
'& .RaSimpleFormIterator-line > .RaSimpleFormIterator-form': {
|
|
15
18
|
paddingBottom: theme.spacing(0.5),
|
|
@@ -19,7 +22,10 @@ const StyledArrayInput = styled(RaArrayInput, {
|
|
|
19
22
|
}
|
|
20
23
|
}));
|
|
21
24
|
|
|
22
|
-
export type ArrayInputProps = RaArrayInputProps &
|
|
25
|
+
export type ArrayInputProps = RaArrayInputProps &
|
|
26
|
+
LabeledArrayInputProps & {
|
|
27
|
+
divider?: boolean;
|
|
28
|
+
};
|
|
23
29
|
|
|
24
30
|
/**
|
|
25
31
|
* Espone un componente di tipo ArrayInput con stile grafico di Applica.
|
|
@@ -28,11 +34,9 @@ export type ArrayInputProps = RaArrayInputProps & LabeledArrayInputProps;
|
|
|
28
34
|
* @param {ArrayInputProps}
|
|
29
35
|
* @returns {React.ReactElement}
|
|
30
36
|
*/
|
|
31
|
-
const ArrayInput = ({
|
|
32
|
-
<LabeledArrayInput label={label} addLabel={addLabel} source={source} helperText={helperText} divider>
|
|
33
|
-
<StyledArrayInput source={source} label={false} {...props}
|
|
34
|
-
{children}
|
|
35
|
-
</StyledArrayInput>
|
|
37
|
+
const ArrayInput = ({ label, addLabel, source, helperText, divider = true, ...props }: ArrayInputProps): React.ReactElement => (
|
|
38
|
+
<LabeledArrayInput label={label} addLabel={addLabel} source={source} helperText={helperText} divider={divider}>
|
|
39
|
+
<StyledArrayInput source={source} label={false} {...props} />
|
|
36
40
|
</LabeledArrayInput>
|
|
37
41
|
);
|
|
38
42
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import LabeledInput from './LabeledInput';
|
|
2
|
-
import { SelectInput as RaSelectInput } from 'react-admin';
|
|
1
|
+
import LabeledInput, { LabeledInputProps } from './LabeledInput';
|
|
2
|
+
import { SelectInput as RaSelectInput, SelectInputProps as RaSelectInputProps } from 'react-admin';
|
|
3
|
+
|
|
3
4
|
import { styled } from '@mui/material/styles';
|
|
4
5
|
|
|
5
6
|
const ApplicaStyledSelectInput = styled(RaSelectInput, {
|
|
@@ -10,7 +11,8 @@ const ApplicaStyledSelectInput = styled(RaSelectInput, {
|
|
|
10
11
|
width: label === false ? 0 : 'auto'
|
|
11
12
|
}
|
|
12
13
|
}));
|
|
13
|
-
|
|
14
|
+
export type SelectInputProps = LabeledInputProps & RaSelectInputProps;
|
|
15
|
+
const SelectInput = (props: SelectInputProps) => (
|
|
14
16
|
<LabeledInput {...props}>
|
|
15
17
|
<ApplicaStyledSelectInput />
|
|
16
18
|
</LabeledInput>
|
package/src/index.jsx
CHANGED
|
@@ -9,7 +9,6 @@ export * from './utils';
|
|
|
9
9
|
export * from './i18n';
|
|
10
10
|
|
|
11
11
|
export {
|
|
12
|
-
ArrayInput as RaArrayInput,
|
|
13
12
|
ArrayInputContext,
|
|
14
13
|
BooleanField,
|
|
15
14
|
BulkDeleteWithConfirmButton,
|
|
@@ -72,5 +71,7 @@ export {
|
|
|
72
71
|
useTranslate,
|
|
73
72
|
useUnselect,
|
|
74
73
|
useUnselectAll,
|
|
75
|
-
useUpdateMany
|
|
74
|
+
useUpdateMany,
|
|
75
|
+
useSimpleFormIterator,
|
|
76
|
+
useSimpleFormIteratorItem
|
|
76
77
|
} from 'react-admin';
|