@applica-software-guru/react-admin 1.4.214 → 1.4.216
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/TableForm/TableFormIterator.d.ts +0 -1
- package/dist/components/ra-forms/TableForm/TableFormIterator.d.ts.map +1 -1
- package/dist/components/ra-forms/TableForm/TableFormIteratorItem.d.ts +0 -1
- package/dist/components/ra-forms/TableForm/TableFormIteratorItem.d.ts.map +1 -1
- package/dist/react-admin.cjs.js +77 -73
- package/dist/react-admin.cjs.js.map +1 -1
- package/dist/react-admin.es.js +12410 -11201
- package/dist/react-admin.es.js.map +1 -1
- package/dist/react-admin.umd.js +76 -72
- package/dist/react-admin.umd.js.map +1 -1
- package/package.json +3 -3
- package/src/components/ra-forms/TableForm/TableFormIterator.tsx +2 -5
- package/src/components/ra-forms/TableForm/TableFormIteratorItem.tsx +2 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applica-software-guru/react-admin",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.216",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@mui/base": "5.0.0-beta.19",
|
|
55
55
|
"@mui/icons-material": "^5.0.1",
|
|
56
56
|
"@mui/lab": "5.0.0-alpha.148",
|
|
57
|
-
"@mui/material": "5.
|
|
57
|
+
"@mui/material": "5.15.18",
|
|
58
58
|
"dayjs": "^1.11.8",
|
|
59
59
|
"framer-motion": "^10.12.17",
|
|
60
60
|
"history": "^5.1.0",
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"@mui/base": "5.0.0-beta.19",
|
|
106
106
|
"@mui/icons-material": "^5.0.1",
|
|
107
107
|
"@mui/lab": "5.0.0-alpha.148",
|
|
108
|
-
"@mui/material": "5.
|
|
108
|
+
"@mui/material": "5.15.18",
|
|
109
109
|
"react": "^18.2.0",
|
|
110
110
|
"react-admin": "4.14.5",
|
|
111
111
|
"react-dom": "^18.2.0"
|
|
@@ -45,7 +45,6 @@ export function RawTableFormIterator(props: TableFormIteratorProps): ReactElemen
|
|
|
45
45
|
resource,
|
|
46
46
|
source,
|
|
47
47
|
label,
|
|
48
|
-
disableActions = false,
|
|
49
48
|
disableAdd = false,
|
|
50
49
|
disableRemove = false,
|
|
51
50
|
enableClearAll = false,
|
|
@@ -183,7 +182,7 @@ export function RawTableFormIterator(props: TableFormIteratorProps): ReactElemen
|
|
|
183
182
|
);
|
|
184
183
|
})}
|
|
185
184
|
|
|
186
|
-
{!
|
|
185
|
+
{!disableRemove &&
|
|
187
186
|
(showClearAllButton ? (
|
|
188
187
|
<TableCell key="actions" sx={{ display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
|
|
189
188
|
<ActionsMenu horizontal>
|
|
@@ -201,7 +200,7 @@ export function RawTableFormIterator(props: TableFormIteratorProps): ReactElemen
|
|
|
201
200
|
<TableBody>
|
|
202
201
|
{fields.length === 0 && (
|
|
203
202
|
<TableRow sx={{ '&:last-child td, &:last-child th': { border: 0 } }}>
|
|
204
|
-
<TableCell colSpan={4 + (
|
|
203
|
+
<TableCell colSpan={4 + (disableRemove ? 0 : 1)} align="center">
|
|
205
204
|
{empty ? (
|
|
206
205
|
empty
|
|
207
206
|
) : (
|
|
@@ -218,7 +217,6 @@ export function RawTableFormIterator(props: TableFormIteratorProps): ReactElemen
|
|
|
218
217
|
<TableRow sx={{ borderBottom: `1px solid ${tableBorderColor}}` }} key={member.id}>
|
|
219
218
|
<TableFormIteratorItem
|
|
220
219
|
disableRemove={disableRemove}
|
|
221
|
-
disableActions={disableActions}
|
|
222
220
|
index={index}
|
|
223
221
|
member={`${source}.${index}`}
|
|
224
222
|
onRemoveField={removeField}
|
|
@@ -294,7 +292,6 @@ export interface TableFormIteratorProps extends Partial<UseFieldArrayReturn> {
|
|
|
294
292
|
children?: ReactNode;
|
|
295
293
|
className?: string;
|
|
296
294
|
disableAdd?: boolean;
|
|
297
|
-
disableActions?: boolean;
|
|
298
295
|
disableRemove?: boolean;
|
|
299
296
|
enableClearAll?: boolean;
|
|
300
297
|
template?: object;
|
|
@@ -9,7 +9,7 @@ import ActionsMenu from '../../ActionsMenu';
|
|
|
9
9
|
|
|
10
10
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
11
11
|
export const TableFormIteratorItem = React.forwardRef((props: TableFormIteratorItemProps, ref: any) => {
|
|
12
|
-
const { children, disabled,
|
|
12
|
+
const { children, disabled, disableRemove = false, index, member, resource } = props;
|
|
13
13
|
const translate = useTranslate();
|
|
14
14
|
const [confirmIsOpen, setConfirmIsOpen] = React.useState<boolean>(false);
|
|
15
15
|
const { total, remove } = useTableFormIterator();
|
|
@@ -51,7 +51,7 @@ export const TableFormIteratorItem = React.forwardRef((props: TableFormIteratorI
|
|
|
51
51
|
);
|
|
52
52
|
})}
|
|
53
53
|
|
|
54
|
-
{!
|
|
54
|
+
{!disableRemove && (
|
|
55
55
|
<TableCell>
|
|
56
56
|
<Stack direction="row" spacing={1} justifyContent="center" alignItems="center">
|
|
57
57
|
<ActionsMenu horizontal>
|
|
@@ -80,7 +80,6 @@ export type TableFormIteratorItemProps = {
|
|
|
80
80
|
children?: ReactNode;
|
|
81
81
|
disabled?: boolean;
|
|
82
82
|
disableRemove?: boolean;
|
|
83
|
-
disableActions?: boolean;
|
|
84
83
|
index: number;
|
|
85
84
|
member: string;
|
|
86
85
|
onRemoveField: (index: number) => void;
|