@applica-software-guru/react-admin 1.3.182 → 1.3.184
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/Admin.d.ts +5 -8
- package/dist/Admin.d.ts.map +1 -1
- package/dist/AdminContext.d.ts +2 -4
- package/dist/AdminContext.d.ts.map +1 -1
- package/dist/ApplicaAdmin.d.ts +4 -24
- package/dist/ApplicaAdmin.d.ts.map +1 -1
- package/dist/components/@extended/Breadcrumbs.d.ts +2 -8
- package/dist/components/AuthBackground.d.ts +2 -1
- package/dist/components/AuthBackground.d.ts.map +1 -1
- package/dist/components/Layout/Drawer/Drawer.d.ts +2 -2
- package/dist/components/Layout/Drawer/Drawer.d.ts.map +1 -1
- package/dist/components/Layout/Drawer/DrawerHeader.d.ts +2 -2
- package/dist/components/Layout/Drawer/DrawerHeader.d.ts.map +1 -1
- package/dist/components/Layout/Drawer/DrawerHeaderStyled.d.ts +1 -0
- package/dist/components/Layout/Drawer/DrawerHeaderStyled.d.ts.map +1 -1
- package/dist/components/Layout/Footer.d.ts +0 -11
- package/dist/components/Layout/Footer.d.ts.map +1 -1
- package/dist/components/Layout/Header/AppBarStyled.d.ts +7 -3
- package/dist/components/Layout/Header/AppBarStyled.d.ts.map +1 -1
- package/dist/components/Layout/Layout.d.ts.map +1 -1
- package/dist/components/Notification.d.ts +3 -6
- package/dist/components/Notification.d.ts.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/ra-buttons/CreateInDialogButton.d.ts +3 -33
- package/dist/components/ra-buttons/CreateInDialogButton.d.ts.map +1 -1
- package/dist/components/ra-buttons/EditInDialogButton.d.ts +9 -22
- package/dist/components/ra-buttons/EditInDialogButton.d.ts.map +1 -1
- package/dist/components/ra-buttons/ImpersonateUserButton.d.ts +5 -10
- package/dist/components/ra-buttons/ImpersonateUserButton.d.ts.map +1 -1
- package/dist/components/ra-buttons/index.d.ts +3 -4
- package/dist/components/ra-buttons/index.d.ts.map +1 -1
- package/dist/components/ra-custom/ListItem.d.ts +1 -20
- package/dist/components/ra-custom/ListItem.d.ts.map +1 -1
- package/dist/components/ra-custom/index.d.ts +1 -2
- package/dist/components/ra-custom/index.d.ts.map +1 -1
- package/dist/components/ra-fields/ActionsField.d.ts +7 -21
- package/dist/components/ra-fields/ActionsField.d.ts.map +1 -1
- package/dist/components/ra-fields/AttachmentField.d.ts +2 -25
- package/dist/components/ra-fields/AttachmentField.d.ts.map +1 -1
- package/dist/components/ra-fields/BaseAttachmentField.d.ts +1 -15
- package/dist/components/ra-fields/BaseAttachmentField.d.ts.map +1 -1
- package/dist/components/ra-fields/CoverField.d.ts +10 -31
- package/dist/components/ra-fields/CoverField.d.ts.map +1 -1
- package/dist/components/ra-fields/DateAgoField.d.ts +6 -8
- package/dist/components/ra-fields/DateAgoField.d.ts.map +1 -1
- package/dist/components/ra-fields/DateField.d.ts +3 -5
- package/dist/components/ra-fields/DateField.d.ts.map +1 -1
- package/dist/components/ra-fields/EmailField.d.ts +3 -16
- package/dist/components/ra-fields/EmailField.d.ts.map +1 -1
- package/dist/components/ra-fields/FileField.d.ts +8 -25
- package/dist/components/ra-fields/FileField.d.ts.map +1 -1
- package/dist/components/ra-fields/FunctionField.d.ts +3 -6
- package/dist/components/ra-fields/FunctionField.d.ts.map +1 -1
- package/dist/components/ra-fields/ImageField.d.ts +3 -18
- package/dist/components/ra-fields/ImageField.d.ts.map +1 -1
- package/dist/components/ra-fields/LocalizedTextField.d.ts +3 -2
- package/dist/components/ra-fields/LocalizedTextField.d.ts.map +1 -1
- package/dist/components/ra-fields/ReadonlyField.d.ts +1 -1
- package/dist/components/ra-fields/ReadonlyField.d.ts.map +1 -1
- package/dist/components/ra-fields/ReferenceManyField.d.ts +7 -16
- package/dist/components/ra-fields/ReferenceManyField.d.ts.map +1 -1
- package/dist/components/ra-fields/SizeField.d.ts +6 -11
- package/dist/components/ra-fields/SizeField.d.ts.map +1 -1
- package/dist/components/ra-fields/TextField.d.ts +3 -5
- package/dist/components/ra-fields/TextField.d.ts.map +1 -1
- package/dist/components/ra-fields/index.d.ts +14 -15
- package/dist/components/ra-fields/index.d.ts.map +1 -1
- package/dist/components/ra-forms/CardForm.d.ts +22 -26
- package/dist/components/ra-forms/CardForm.d.ts.map +1 -1
- package/dist/components/ra-forms/ChangePasswordForm.d.ts +2 -1
- package/dist/components/ra-forms/ChangePasswordForm.d.ts.map +1 -1
- package/dist/components/ra-forms/Create.d.ts +3 -4
- package/dist/components/ra-forms/Create.d.ts.map +1 -1
- package/dist/components/ra-forms/Edit.d.ts +3 -2
- package/dist/components/ra-forms/Edit.d.ts.map +1 -1
- package/dist/components/ra-forms/FormHeader.d.ts +4 -20
- package/dist/components/ra-forms/FormHeader.d.ts.map +1 -1
- package/dist/components/ra-forms/LongForm/Content.d.ts +1 -1
- package/dist/components/ra-forms/LongForm/Content.d.ts.map +1 -1
- package/dist/components/ra-forms/LongForm/Form.d.ts +1 -1
- package/dist/components/ra-forms/LongForm/Form.d.ts.map +1 -1
- package/dist/components/ra-forms/LongForm/NavMenu.d.ts.map +1 -1
- package/dist/components/ra-forms/LongForm/Provider.d.ts.map +1 -1
- package/dist/components/ra-forms/LongForm/Sidebar.d.ts +1 -1
- package/dist/components/ra-forms/LongForm/Sidebar.d.ts.map +1 -1
- package/dist/components/ra-forms/LongForm/Tab.d.ts +2 -2
- package/dist/components/ra-forms/LongForm/Tab.d.ts.map +1 -1
- package/dist/components/ra-forms/LongForm/hooks.d.ts.map +1 -1
- package/dist/components/ra-forms/LongForm/index.d.ts +2 -2
- package/dist/components/ra-forms/LongForm/index.d.ts.map +1 -1
- package/dist/components/ra-forms/LongForm/utils.d.ts +1 -1
- package/dist/components/ra-forms/LongForm/utils.d.ts.map +1 -1
- package/dist/components/ra-forms/Show.d.ts +3 -12
- package/dist/components/ra-forms/Show.d.ts.map +1 -1
- package/dist/components/ra-forms/SimpleForm.d.ts +1 -30
- package/dist/components/ra-forms/SimpleForm.d.ts.map +1 -1
- package/dist/components/ra-forms/SimpleFormIterator.d.ts +1 -3
- package/dist/components/ra-forms/SimpleFormIterator.d.ts.map +1 -1
- package/dist/components/ra-forms/TabbedForm.d.ts +5 -9
- package/dist/components/ra-forms/TabbedForm.d.ts.map +1 -1
- package/dist/components/ra-forms/TableForm/TableFormIterator.d.ts +21 -22
- package/dist/components/ra-forms/TableForm/TableFormIterator.d.ts.map +1 -1
- package/dist/components/ra-forms/TableForm/TableFormIteratorItem.d.ts +1 -1
- package/dist/components/ra-forms/TableForm/TableFormIteratorItem.d.ts.map +1 -1
- package/dist/components/ra-forms/TableForm/index.d.ts +1 -2
- package/dist/components/ra-forms/TableForm/index.d.ts.map +1 -1
- package/dist/components/ra-forms/Toolbar.d.ts +3 -9
- package/dist/components/ra-forms/Toolbar.d.ts.map +1 -1
- package/dist/components/ra-forms/index.d.ts +12 -14
- package/dist/components/ra-forms/index.d.ts.map +1 -1
- package/dist/components/ra-inputs/ArrayInput.d.ts +3 -2
- package/dist/components/ra-inputs/ArrayInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/AttachmentInput.d.ts +2 -32
- package/dist/components/ra-inputs/AttachmentInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/AutocompleteArrayInput.d.ts +3 -7
- package/dist/components/ra-inputs/AutocompleteArrayInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/AutocompleteInput.d.ts +3 -5
- package/dist/components/ra-inputs/AutocompleteInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/BooleanInput.d.ts +3 -22
- package/dist/components/ra-inputs/BooleanInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/DateInput.d.ts +3 -16
- package/dist/components/ra-inputs/DateInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/DateTimeInput.d.ts +2 -19
- package/dist/components/ra-inputs/DateTimeInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/FileInput.d.ts +9 -32
- package/dist/components/ra-inputs/FileInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/ImageInput.d.ts +9 -12
- package/dist/components/ra-inputs/ImageInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/LabeledArrayInput.d.ts +2 -24
- package/dist/components/ra-inputs/LabeledArrayInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/LabeledInput.d.ts +1 -20
- package/dist/components/ra-inputs/LabeledInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/LocalizedTextInput.d.ts +2 -2
- package/dist/components/ra-inputs/LocalizedTextInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/NumberInput.d.ts +3 -22
- package/dist/components/ra-inputs/NumberInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/RecordInput.d.ts +7 -13
- package/dist/components/ra-inputs/RecordInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/ReferenceArrayInput.d.ts +6 -22
- package/dist/components/ra-inputs/ReferenceArrayInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/ReferenceInput.d.ts +6 -23
- package/dist/components/ra-inputs/ReferenceInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/ReferenceManyInput.d.ts +10 -12
- package/dist/components/ra-inputs/ReferenceManyInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/SearchInput.d.ts +3 -1
- package/dist/components/ra-inputs/SearchInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/SelectArrayInput.d.ts +3 -26
- package/dist/components/ra-inputs/SelectArrayInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/SelectInput.d.ts +3 -2
- package/dist/components/ra-inputs/SelectInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/SmartTextInput.d.ts +6 -26
- package/dist/components/ra-inputs/SmartTextInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/TextInput.d.ts +2 -16
- package/dist/components/ra-inputs/TextInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/TimeInput.d.ts +3 -16
- package/dist/components/ra-inputs/TimeInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/index.d.ts +23 -24
- package/dist/components/ra-inputs/index.d.ts.map +1 -1
- package/dist/components/ra-lists/BulkActionsToolbar.d.ts +1 -8
- package/dist/components/ra-lists/BulkActionsToolbar.d.ts.map +1 -1
- package/dist/components/ra-lists/BulkFloatingActionsToolbar.d.ts +1 -7
- package/dist/components/ra-lists/BulkFloatingActionsToolbar.d.ts.map +1 -1
- package/dist/components/ra-lists/Datagrid/Datagrid.d.ts +1 -1
- package/dist/components/ra-lists/Datagrid/Datagrid.d.ts.map +1 -1
- package/dist/components/ra-lists/Datagrid/DatagridContextProvider.d.ts +1 -1
- package/dist/components/ra-lists/Datagrid/DatagridContextProvider.d.ts.map +1 -1
- package/dist/components/ra-lists/Datagrid/index.d.ts +1 -4
- package/dist/components/ra-lists/Datagrid/index.d.ts.map +1 -1
- package/dist/components/ra-lists/Empty.d.ts +1 -11
- package/dist/components/ra-lists/Empty.d.ts.map +1 -1
- package/dist/components/ra-lists/List.d.ts +2 -26
- package/dist/components/ra-lists/List.d.ts.map +1 -1
- package/dist/components/ra-lists/ListView.d.ts +1 -16
- package/dist/components/ra-lists/ListView.d.ts.map +1 -1
- package/dist/components/ra-lists/NotificationList/NotificationList.d.ts +4 -3
- package/dist/components/ra-lists/NotificationList/NotificationList.d.ts.map +1 -1
- package/dist/components/ra-lists/NotificationList/buttons/MarkAsReadedButton.d.ts +4 -0
- package/dist/components/ra-lists/NotificationList/buttons/MarkAsReadedButton.d.ts.map +1 -0
- package/dist/components/ra-lists/NotificationList/buttons/MarkAsUnreadedButton.d.ts +4 -0
- package/dist/components/ra-lists/NotificationList/buttons/MarkAsUnreadedButton.d.ts.map +1 -0
- package/dist/components/ra-lists/NotificationList/buttons/index.d.ts +3 -0
- package/dist/components/ra-lists/NotificationList/buttons/index.d.ts.map +1 -0
- package/dist/components/ra-lists/NotificationList/fields/NotificationField.d.ts +4 -0
- package/dist/components/ra-lists/NotificationList/fields/NotificationField.d.ts.map +1 -0
- package/dist/components/ra-lists/NotificationList/fields/index.d.ts +2 -0
- package/dist/components/ra-lists/NotificationList/fields/index.d.ts.map +1 -0
- package/dist/components/ra-lists/NotificationList/index.d.ts +1 -2
- package/dist/components/ra-lists/NotificationList/index.d.ts.map +1 -1
- package/dist/components/ra-lists/SimpleList.d.ts +3 -3
- package/dist/components/ra-lists/SimpleList.d.ts.map +1 -1
- package/dist/components/ra-lists/index.d.ts +7 -7
- package/dist/components/ra-lists/index.d.ts.map +1 -1
- package/dist/components/ra-pages/LoginPage.d.ts +2 -16
- package/dist/components/ra-pages/LoginPage.d.ts.map +1 -1
- package/dist/react-admin.cjs.js +67 -67
- package/dist/react-admin.cjs.js.map +1 -1
- package/dist/react-admin.es.js +11554 -12406
- package/dist/react-admin.es.js.map +1 -1
- package/dist/react-admin.umd.js +67 -67
- package/dist/react-admin.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/{Admin.jsx → Admin.tsx} +6 -14
- package/src/AdminContext.tsx +12 -14
- package/src/ApplicaAdmin.tsx +22 -38
- package/src/components/@extended/Breadcrumbs.jsx +2 -6
- package/src/components/AuthBackground.tsx +2 -2
- package/src/components/Layout/Drawer/Drawer.tsx +2 -3
- package/src/components/Layout/Drawer/DrawerHeader.tsx +2 -2
- package/src/components/Layout/Drawer/DrawerHeaderStyled.jsx +2 -8
- package/src/components/Layout/Footer.tsx +2 -13
- package/src/components/Layout/Header/AppBarStyled.tsx +29 -0
- package/src/components/Layout/Layout.tsx +0 -1
- package/src/components/Notification.tsx +15 -0
- package/src/components/index.jsx +1 -0
- package/src/components/ra-buttons/CreateInDialogButton.tsx +11 -47
- package/src/components/ra-buttons/{EditInDialogButton.jsx → EditInDialogButton.tsx} +20 -21
- package/src/components/ra-buttons/{ImpersonateUserButton.jsx → ImpersonateUserButton.tsx} +8 -9
- package/src/components/ra-buttons/index.ts +3 -0
- package/src/components/ra-custom/ListItem.tsx +4 -39
- package/src/components/ra-custom/index.ts +1 -0
- package/src/components/ra-fields/{ActionsField.jsx → ActionsField.tsx} +8 -16
- package/src/components/ra-fields/AttachmentField.tsx +4 -14
- package/src/components/ra-fields/BaseAttachmentField.tsx +2 -16
- package/src/components/ra-fields/{CoverField.jsx → CoverField.tsx} +17 -28
- package/src/components/ra-fields/{DateAgoField.jsx → DateAgoField.tsx} +8 -11
- package/src/components/ra-fields/DateField.tsx +14 -0
- package/src/components/ra-fields/EmailField.tsx +13 -0
- package/src/components/ra-fields/{FileField.jsx → FileField.tsx} +17 -13
- package/src/components/ra-fields/FunctionField.tsx +7 -0
- package/src/components/ra-fields/{ImageField.jsx → ImageField.tsx} +3 -9
- package/src/components/ra-fields/LocalizedTextField.tsx +3 -3
- package/src/components/ra-fields/ReadonlyField.tsx +4 -3
- package/src/components/ra-fields/ReferenceManyField.tsx +24 -35
- package/src/components/ra-fields/{SizeField.jsx → SizeField.tsx} +8 -9
- package/src/components/ra-fields/TextField.tsx +14 -0
- package/src/components/ra-fields/index.ts +14 -0
- package/src/components/ra-forms/CardForm.tsx +102 -0
- package/src/components/ra-forms/ChangePasswordForm.tsx +4 -6
- package/src/components/ra-forms/Create.tsx +6 -8
- package/src/components/ra-forms/{Edit.jsx → Edit.tsx} +5 -5
- package/src/components/ra-forms/FormHeader.tsx +5 -23
- package/src/components/ra-forms/LongForm/Content.tsx +1 -1
- package/src/components/ra-forms/LongForm/Form.tsx +3 -3
- package/src/components/ra-forms/LongForm/NavMenu.tsx +3 -3
- package/src/components/ra-forms/LongForm/Provider.tsx +3 -4
- package/src/components/ra-forms/LongForm/Sidebar.tsx +2 -2
- package/src/components/ra-forms/LongForm/Tab.tsx +5 -5
- package/src/components/ra-forms/LongForm/hooks.tsx +3 -3
- package/src/components/ra-forms/LongForm/index.ts +3 -13
- package/src/components/ra-forms/LongForm/utils.ts +1 -1
- package/src/components/ra-forms/Show.tsx +21 -19
- package/src/components/ra-forms/SimpleForm.tsx +23 -40
- package/src/components/ra-forms/SimpleFormIterator.tsx +26 -24
- package/src/components/ra-forms/TabbedForm.tsx +36 -27
- package/src/components/ra-forms/TableForm/TableFormIterator.tsx +6 -34
- package/src/components/ra-forms/TableForm/TableFormIteratorItem.tsx +3 -4
- package/src/components/ra-forms/TableForm/index.ts +1 -3
- package/src/components/ra-forms/{Toolbar.jsx → Toolbar.tsx} +6 -11
- package/src/components/ra-forms/index.ts +12 -0
- package/src/components/ra-inputs/ArrayInput.tsx +15 -15
- package/src/components/ra-inputs/AttachmentInput.tsx +17 -25
- package/src/components/ra-inputs/AutocompleteArrayInput.tsx +27 -0
- package/src/components/ra-inputs/{AutocompleteInput.jsx → AutocompleteInput.tsx} +8 -18
- package/src/components/ra-inputs/{BooleanInput.jsx → BooleanInput.tsx} +8 -15
- package/src/components/ra-inputs/DateInput.tsx +24 -0
- package/src/components/ra-inputs/DateTimeInput.tsx +10 -18
- package/src/components/ra-inputs/{FileInput.jsx → FileInput.tsx} +28 -29
- package/src/components/ra-inputs/ImageInput.tsx +44 -0
- package/src/components/ra-inputs/LabeledArrayInput.tsx +8 -31
- package/src/components/ra-inputs/LabeledInput.tsx +12 -24
- package/src/components/ra-inputs/LocalizedTextInput.tsx +7 -7
- package/src/components/ra-inputs/NumberInput.tsx +24 -0
- package/src/components/ra-inputs/{RecordInput.jsx → RecordInput.tsx} +20 -18
- package/src/components/ra-inputs/ReferenceArrayInput.tsx +19 -0
- package/src/components/ra-inputs/ReferenceInput.tsx +19 -0
- package/src/components/ra-inputs/ReferenceManyInput.tsx +26 -0
- package/src/components/ra-inputs/SearchInput.tsx +12 -0
- package/src/components/ra-inputs/SelectArrayInput.tsx +33 -0
- package/src/components/ra-inputs/SelectInput.tsx +8 -10
- package/src/components/ra-inputs/{SmartTextInput.jsx → SmartTextInput.tsx} +10 -20
- package/src/components/ra-inputs/TextInput.tsx +9 -12
- package/src/components/ra-inputs/TimeInput.tsx +39 -0
- package/src/components/ra-inputs/index.ts +23 -0
- package/src/components/ra-lists/BulkActionsToolbar.tsx +6 -15
- package/src/components/ra-lists/BulkFloatingActionsToolbar.tsx +5 -9
- package/src/components/ra-lists/Datagrid/Datagrid.tsx +5 -6
- package/src/components/ra-lists/Datagrid/DatagridContextProvider.tsx +1 -1
- package/src/components/ra-lists/Datagrid/index.tsx +2 -6
- package/src/components/ra-lists/Empty.tsx +5 -16
- package/src/components/ra-lists/List.tsx +11 -47
- package/src/components/ra-lists/ListView.tsx +4 -19
- package/src/components/ra-lists/NotificationList/{NotificationList.jsx → NotificationList.tsx} +7 -8
- package/src/components/ra-lists/NotificationList/{button/MarkAsReadedButton.jsx → buttons/MarkAsReadedButton.tsx} +9 -9
- package/src/components/ra-lists/NotificationList/{button/MarkAsUnreadedButton.jsx → buttons/MarkAsUnreadedButton.tsx} +7 -6
- package/src/components/ra-lists/NotificationList/buttons/index.ts +2 -0
- package/src/components/ra-lists/NotificationList/{field/NotificationField.jsx → fields/NotificationField.tsx} +5 -5
- package/src/components/ra-lists/NotificationList/fields/index.ts +1 -0
- package/src/components/ra-lists/NotificationList/index.ts +1 -0
- package/src/components/ra-lists/SimpleList.tsx +2 -2
- package/src/components/ra-lists/index.ts +7 -7
- package/src/components/ra-pages/LoginPage.tsx +11 -16
- package/vite.config.js +84 -71
- package/dist/components/ra-lists/NotificationList/button/MarkAsReadedButton.d.ts +0 -3
- package/dist/components/ra-lists/NotificationList/button/MarkAsReadedButton.d.ts.map +0 -1
- package/dist/components/ra-lists/NotificationList/button/MarkAsUnreadedButton.d.ts +0 -3
- package/dist/components/ra-lists/NotificationList/button/MarkAsUnreadedButton.d.ts.map +0 -1
- package/dist/components/ra-lists/NotificationList/button/index.d.ts +0 -3
- package/dist/components/ra-lists/NotificationList/button/index.d.ts.map +0 -1
- package/dist/components/ra-lists/NotificationList/field/NotificationField.d.ts +0 -3
- package/dist/components/ra-lists/NotificationList/field/NotificationField.d.ts.map +0 -1
- package/dist/components/ra-lists/NotificationList/field/index.d.ts +0 -2
- package/dist/components/ra-lists/NotificationList/field/index.d.ts.map +0 -1
- package/src/components/Layout/Header/AppBarStyled.jsx +0 -32
- package/src/components/Notification.jsx +0 -13
- package/src/components/ra-buttons/index.jsx +0 -4
- package/src/components/ra-custom/index.tsx +0 -2
- package/src/components/ra-fields/DateField.jsx +0 -27
- package/src/components/ra-fields/EmailField.jsx +0 -27
- package/src/components/ra-fields/FunctionField.jsx +0 -9
- package/src/components/ra-fields/TextField.jsx +0 -27
- package/src/components/ra-fields/index.jsx +0 -30
- package/src/components/ra-forms/CardForm.jsx +0 -107
- package/src/components/ra-forms/index.jsx +0 -29
- package/src/components/ra-inputs/AutocompleteArrayInput.jsx +0 -35
- package/src/components/ra-inputs/DateInput.jsx +0 -30
- package/src/components/ra-inputs/ImageInput.jsx +0 -45
- package/src/components/ra-inputs/NumberInput.jsx +0 -28
- package/src/components/ra-inputs/ReferenceArrayInput.jsx +0 -23
- package/src/components/ra-inputs/ReferenceInput.jsx +0 -23
- package/src/components/ra-inputs/ReferenceManyInput.jsx +0 -33
- package/src/components/ra-inputs/SearchInput.jsx +0 -14
- package/src/components/ra-inputs/SelectArrayInput.jsx +0 -47
- package/src/components/ra-inputs/TimeInput.jsx +0 -46
- package/src/components/ra-inputs/index.jsx +0 -48
- package/src/components/ra-lists/NotificationList/button/index.jsx +0 -2
- package/src/components/ra-lists/NotificationList/field/index.jsx +0 -1
- package/src/components/ra-lists/NotificationList/index.jsx +0 -2
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { Form, SaveButton, useResourceContext, useTranslate } from 'react-admin';
|
|
2
|
+
import { Grid, GridProps } from '@mui/material';
|
|
3
|
+
import { styled } from '@mui/material/styles';
|
|
4
|
+
import { useThemeConfig } from '../../hooks';
|
|
5
|
+
import MainCard from '../MainCard';
|
|
6
|
+
import React, { Fragment, useMemo } from 'react';
|
|
7
|
+
import Toolbar from './Toolbar';
|
|
8
|
+
|
|
9
|
+
export type SectionProps = {
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
content?: boolean | undefined | null;
|
|
12
|
+
title?: string | React.ReactNode | null;
|
|
13
|
+
subheader?: string | React.ReactNode;
|
|
14
|
+
secondary?: string | React.ReactNode;
|
|
15
|
+
toolbar?: React.ReactNode | boolean;
|
|
16
|
+
} & GridProps;
|
|
17
|
+
|
|
18
|
+
function Section({
|
|
19
|
+
children,
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
content = true,
|
|
22
|
+
title,
|
|
23
|
+
subheader = null,
|
|
24
|
+
secondary = null,
|
|
25
|
+
toolbar = false,
|
|
26
|
+
lg = 12,
|
|
27
|
+
md = 12,
|
|
28
|
+
sm = 12,
|
|
29
|
+
xs = 12,
|
|
30
|
+
...gridProps
|
|
31
|
+
}: SectionProps): JSX.Element {
|
|
32
|
+
const translate = useTranslate();
|
|
33
|
+
const resource = useResourceContext();
|
|
34
|
+
const { cardTitle, cardSubheader } = useMemo(() => {
|
|
35
|
+
const defaultTitle = (title || `resources.${resource}.title`) as string;
|
|
36
|
+
return {
|
|
37
|
+
cardTitle: translate(defaultTitle, { _: defaultTitle }),
|
|
38
|
+
cardSubheader: subheader !== null ? translate(subheader as string, { _: subheader }) : null
|
|
39
|
+
};
|
|
40
|
+
}, [resource, subheader, title, translate]);
|
|
41
|
+
return (
|
|
42
|
+
<Grid item {...gridProps} lg={lg} md={md} sm={sm} xs={xs}>
|
|
43
|
+
<MainCard content={content} title={cardTitle} subheader={cardSubheader} secondary={secondary} divider>
|
|
44
|
+
<Fragment>
|
|
45
|
+
{children}
|
|
46
|
+
{toolbar === true ? (
|
|
47
|
+
<Toolbar>
|
|
48
|
+
<SaveButton />
|
|
49
|
+
</Toolbar>
|
|
50
|
+
) : (
|
|
51
|
+
toolbar
|
|
52
|
+
)}
|
|
53
|
+
</Fragment>
|
|
54
|
+
</MainCard>
|
|
55
|
+
</Grid>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
type StyledFormProps = {
|
|
60
|
+
children: React.ReactNode;
|
|
61
|
+
spacing?: number;
|
|
62
|
+
defaultValues?: any;
|
|
63
|
+
theme: any;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const StyledForm = styled(Form, {
|
|
67
|
+
name: 'RaApplicaCardForm',
|
|
68
|
+
slot: 'root'
|
|
69
|
+
})(({ theme, spacing }: StyledFormProps) => ({
|
|
70
|
+
backgroundColor: 'transparent',
|
|
71
|
+
'& .RaToolbar-desktopToolbar': {
|
|
72
|
+
marginTop: theme.spacing((spacing as number) * 2),
|
|
73
|
+
padding: 0
|
|
74
|
+
}
|
|
75
|
+
}));
|
|
76
|
+
|
|
77
|
+
export type CardFormProps = {
|
|
78
|
+
children: React.ReactNode;
|
|
79
|
+
spacing?: number;
|
|
80
|
+
defaultValues?: any;
|
|
81
|
+
} & GridProps;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Basic card form layout.
|
|
85
|
+
* It is a simple form layout that uses a card as the main container.
|
|
86
|
+
*
|
|
87
|
+
* @see https://mui.com/material-ui/react-stack/
|
|
88
|
+
*/
|
|
89
|
+
export function CardForm({ children, spacing, defaultValues, ...gridProps }: CardFormProps): JSX.Element {
|
|
90
|
+
const { spacing: themeSpacing } = useThemeConfig();
|
|
91
|
+
return (
|
|
92
|
+
// @ts-ignore
|
|
93
|
+
<StyledForm defaultValues={defaultValues} spacing={spacing || themeSpacing}>
|
|
94
|
+
<Grid container {...gridProps} spacing={spacing || themeSpacing}>
|
|
95
|
+
{children}
|
|
96
|
+
</Grid>
|
|
97
|
+
</StyledForm>
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
CardForm.Section = Section;
|
|
101
|
+
|
|
102
|
+
export default CardForm;
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { Alert, AlertTitle, Grid } from '@mui/material';
|
|
2
2
|
import { EditContextProvider, ResourceContextProvider, required, useAuthProvider, useNotify, useTranslate } from 'ra-core';
|
|
3
|
-
import { useCallback, useState } from 'react';
|
|
4
|
-
|
|
5
3
|
import { SaveButton } from 'react-admin';
|
|
6
|
-
import SimpleForm from './SimpleForm';
|
|
4
|
+
import { SimpleForm } from './SimpleForm';
|
|
7
5
|
import { TextInput } from '../ra-inputs';
|
|
8
6
|
import { Toolbar } from '../ra-forms';
|
|
7
|
+
import { useCallback, useState } from 'react';
|
|
9
8
|
import { useThemeConfig } from '../../hooks';
|
|
10
9
|
|
|
11
10
|
export type ChangePasswordFormProps = {
|
|
12
11
|
onSuccess: () => void;
|
|
13
12
|
firstAccess?: boolean;
|
|
14
13
|
};
|
|
15
|
-
|
|
14
|
+
export function ChangePasswordForm({ onSuccess, firstAccess }: ChangePasswordFormProps): JSX.Element {
|
|
16
15
|
const { spacing } = useThemeConfig();
|
|
17
16
|
const [saving, setSaving] = useState(false);
|
|
18
17
|
const authProvider = useAuthProvider();
|
|
@@ -73,6 +72,5 @@ const ChangePasswordForm = ({ onSuccess, firstAccess }: ChangePasswordFormProps)
|
|
|
73
72
|
</EditContextProvider>
|
|
74
73
|
</ResourceContextProvider>
|
|
75
74
|
);
|
|
76
|
-
}
|
|
77
|
-
|
|
75
|
+
}
|
|
78
76
|
export default ChangePasswordForm;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _ from 'lodash';
|
|
2
|
-
import { useCallback, createContext, useContext, useMemo } from 'react';
|
|
3
2
|
import { CreateProps, Identifier, Create as RaCreate, RaRecord, useDataProvider, useResourceContext } from 'react-admin';
|
|
3
|
+
import { Stack, CircularProgress } from '@mui/material';
|
|
4
4
|
import { styled } from '@mui/material/styles';
|
|
5
|
+
import { useCallback, createContext, useContext, useMemo } from 'react';
|
|
5
6
|
import { useLocation } from 'react-router';
|
|
6
7
|
import { useQuery, UseQueryOptions } from 'react-query';
|
|
7
|
-
import { Stack, CircularProgress } from '@mui/material';
|
|
8
8
|
|
|
9
9
|
type ICreateProps<
|
|
10
10
|
RecordType extends Omit<RaRecord, 'id'> = any,
|
|
@@ -18,7 +18,7 @@ type ICreateProps<
|
|
|
18
18
|
type IResourceDefaultValue = object;
|
|
19
19
|
const ResourceDefaultValueContext = createContext<IResourceDefaultValue>({});
|
|
20
20
|
|
|
21
|
-
function
|
|
21
|
+
function CreateWithDefaults(props: ICreateProps) {
|
|
22
22
|
const { useDefaults = false, queryOptions = {} } = props,
|
|
23
23
|
resource = useResourceContext(),
|
|
24
24
|
dataProvider = useDataProvider(),
|
|
@@ -67,11 +67,11 @@ function Create(props: ICreateProps) {
|
|
|
67
67
|
);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
function useResourceDefaultValues(): IResourceDefaultValue {
|
|
70
|
+
export function useResourceDefaultValues(): IResourceDefaultValue {
|
|
71
71
|
return useContext(ResourceDefaultValueContext);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
const
|
|
74
|
+
export const Create = styled(CreateWithDefaults, {
|
|
75
75
|
name: 'RaApplicaEdit',
|
|
76
76
|
slot: 'root'
|
|
77
77
|
})(({ theme }) => ({
|
|
@@ -95,6 +95,4 @@ const StyledCreate = styled(Create, {
|
|
|
95
95
|
}
|
|
96
96
|
}));
|
|
97
97
|
|
|
98
|
-
export default
|
|
99
|
-
|
|
100
|
-
export { useResourceDefaultValues };
|
|
98
|
+
export default Create;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Edit as RaEdit } from 'react-admin';
|
|
2
2
|
import { styled } from '@mui/material/styles';
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
export const Edit = styled(RaEdit, {
|
|
5
5
|
name: 'RaApplicaEdit',
|
|
6
6
|
slot: 'root'
|
|
7
7
|
})(({ theme }) => ({
|
|
@@ -26,9 +26,9 @@ const StyledEdit = styled(RaEdit, {
|
|
|
26
26
|
'& .RaEdit-main>.MuiPaper-root:first-of-type': {
|
|
27
27
|
backgroundColor: theme.palette.background.default
|
|
28
28
|
},
|
|
29
|
-
//
|
|
30
|
-
//
|
|
31
|
-
//
|
|
29
|
+
// This line of code took me 4 hours to write and solve a problem with react-sticky-box and Long Forms.
|
|
30
|
+
// The overflow is 'hidden' by default, we need it to be visible to allow react-sticky-box to work and manage visibility with anchors
|
|
31
|
+
// of all the elements inside the page.
|
|
32
32
|
'& .RaEdit-main:has(.ApplicaLongFormView)>.MuiPaper-root:first-of-type': {
|
|
33
33
|
overflow: 'visible'
|
|
34
34
|
},
|
|
@@ -37,4 +37,4 @@ const StyledEdit = styled(RaEdit, {
|
|
|
37
37
|
}
|
|
38
38
|
}));
|
|
39
39
|
|
|
40
|
-
export default
|
|
40
|
+
export default Edit;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { CardHeader, Divider } from '@mui/material';
|
|
2
|
-
|
|
3
2
|
import { Fragment } from 'react';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
3
|
import { styled } from '@mui/material/styles';
|
|
6
4
|
import { useTranslate } from 'react-admin';
|
|
7
5
|
|
|
@@ -27,14 +25,11 @@ export type FormHeaderProps = {
|
|
|
27
25
|
};
|
|
28
26
|
|
|
29
27
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* @param {FormHeaderProps} props
|
|
35
|
-
* @returns {JSX.Element}
|
|
28
|
+
* Implements the header of a form.
|
|
29
|
+
* Can be inserted inside a CardForm or a SimpleForm and shows a title with a divider
|
|
30
|
+
* that covers the entire width of the form.
|
|
36
31
|
*/
|
|
37
|
-
|
|
32
|
+
export function FormHeader({ title, divider = true, variant = 'h5' }: FormHeaderProps): JSX.Element {
|
|
38
33
|
const translate = useTranslate();
|
|
39
34
|
return (
|
|
40
35
|
<Fragment>
|
|
@@ -47,17 +42,4 @@ const FormHeader = ({ title, divider, variant }: FormHeaderProps): JSX.Element =
|
|
|
47
42
|
{divider && <StyledDivider />}
|
|
48
43
|
</Fragment>
|
|
49
44
|
);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
FormHeader.propTypes = {
|
|
53
|
-
title: PropTypes.string.isRequired,
|
|
54
|
-
divider: PropTypes.bool,
|
|
55
|
-
variant: PropTypes.oneOf(['h1', 'h2', 'h3', 'h4', 'h5', 'h6'])
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
FormHeader.defaultProps = {
|
|
59
|
-
divider: true,
|
|
60
|
-
variant: 'h5'
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
export default FormHeader;
|
|
45
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _ from 'lodash';
|
|
2
2
|
import { BaseForm, IBaseFormProps } from './BaseForm';
|
|
3
|
-
import { IProviderProps, Provider } from './Provider';
|
|
4
|
-
import { Disposition } from './types';
|
|
5
|
-
import { Sidebar, useSidebarChildren } from './Sidebar';
|
|
6
3
|
import { Content } from './Content';
|
|
4
|
+
import { Disposition } from './types';
|
|
5
|
+
import { IProviderProps, Provider } from './Provider';
|
|
7
6
|
import { NavMenu } from './NavMenu';
|
|
7
|
+
import { Sidebar, useSidebarChildren } from './Sidebar';
|
|
8
8
|
import { useBaseItemChildren } from './Tab';
|
|
9
9
|
|
|
10
10
|
type IFormProps = IProviderProps &
|
|
@@ -12,12 +12,12 @@ import {
|
|
|
12
12
|
ListItemAvatar,
|
|
13
13
|
Badge
|
|
14
14
|
} from '@mui/material';
|
|
15
|
-
import {
|
|
15
|
+
import { ExpandLess, ExpandMore } from '@mui/icons-material';
|
|
16
|
+
import { getLevel } from './utils';
|
|
16
17
|
import { IItem } from './types';
|
|
17
18
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
18
19
|
import { useChildren, useIsActive, useNavigateForm } from './hooks';
|
|
19
|
-
import {
|
|
20
|
-
import { getLevel } from './utils';
|
|
20
|
+
import { useSetActiveItem, useSyncWithLocation } from './Provider';
|
|
21
21
|
import { useThemeConfig } from '../../../hooks';
|
|
22
22
|
import { useTranslate } from 'ra-core';
|
|
23
23
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { createContext, useCallback, useContext, useEffect, useMemo, useReducer } from 'react';
|
|
2
|
-
import { matchPath, useLocation } from 'react-router';
|
|
3
|
-
|
|
4
|
-
import { IItem } from './types';
|
|
5
1
|
import _ from 'lodash';
|
|
2
|
+
import { createContext, useCallback, useContext, useEffect, useMemo, useReducer } from 'react';
|
|
6
3
|
import { getChildren, getItemsIds, getLevel } from './utils';
|
|
4
|
+
import { IItem } from './types';
|
|
5
|
+
import { matchPath, useLocation } from 'react-router';
|
|
7
6
|
|
|
8
7
|
enum ActionType {
|
|
9
8
|
SET_FORM_ROOT_PATH = 'setFormRootPath',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _ from 'lodash';
|
|
2
|
+
import { Box, Grid, GridProps, Stack } from '@mui/material';
|
|
2
3
|
import { Children, isValidElement, useMemo } from 'react';
|
|
3
|
-
import StickyBox from 'react-sticky-box';
|
|
4
4
|
import { Disposition } from './types';
|
|
5
|
-
import
|
|
5
|
+
import StickyBox from 'react-sticky-box';
|
|
6
6
|
|
|
7
7
|
enum SidebarSectionPosition {
|
|
8
8
|
TOP = 'top',
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import _ from 'lodash';
|
|
2
2
|
import { Box } from '@mui/material';
|
|
3
|
-
import React, { Children, ReactElement, ReactNode, cloneElement, isValidElement, useEffect, useMemo } from 'react';
|
|
4
|
-
import { useAddItem, useRemoveItem, useErrorCount } from './Provider';
|
|
5
|
-
import { Optional } from 'src/types';
|
|
6
|
-
import { IItem } from './types';
|
|
7
|
-
import { useIsActive } from './hooks';
|
|
8
3
|
import { getId } from './utils';
|
|
4
|
+
import { IItem } from './types';
|
|
5
|
+
import { Optional } from 'src/types';
|
|
6
|
+
import { useAddItem, useRemoveItem, useErrorCount } from './Provider';
|
|
9
7
|
import { useFormState } from 'react-hook-form';
|
|
8
|
+
import { useIsActive } from './hooks';
|
|
9
|
+
import React, { Children, ReactElement, ReactNode, cloneElement, isValidElement, useEffect, useMemo } from 'react';
|
|
10
10
|
|
|
11
11
|
type IBaseItemProps = React.PropsWithChildren<Optional<IItem, 'id' | 'index'> & { sources: Array<string> }>;
|
|
12
12
|
type ITabProps = IBaseItemProps;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { useCallback, useMemo } from 'react';
|
|
2
|
-
import { useActiveItem, useFormRootPath, useItems } from './Provider';
|
|
3
|
-
import { IItem } from './types';
|
|
4
1
|
import { getChildren, isChild } from './utils';
|
|
2
|
+
import { IItem } from './types';
|
|
3
|
+
import { useActiveItem, useFormRootPath, useItems } from './Provider';
|
|
4
|
+
import { useCallback, useMemo } from 'react';
|
|
5
5
|
import { useLocation, useNavigate } from 'react-router';
|
|
6
6
|
|
|
7
7
|
function useIsActive(id: string): boolean {
|
|
@@ -1,19 +1,9 @@
|
|
|
1
|
-
import { Form } from './Form';
|
|
2
1
|
import { BaseForm } from './BaseForm';
|
|
3
2
|
import { Content } from './Content';
|
|
4
|
-
import {
|
|
5
|
-
Provider,
|
|
6
|
-
useActiveItem,
|
|
7
|
-
useItems,
|
|
8
|
-
useSyncWithLocation,
|
|
9
|
-
useErrorCount,
|
|
10
|
-
useSetActiveItem,
|
|
11
|
-
useAddItem,
|
|
12
|
-
useRemoveItem,
|
|
13
|
-
useFormRootPath
|
|
14
|
-
} from './Provider';
|
|
15
|
-
import { Sidebar, SidebarSection, SidebarSectionPosition, useSidebarChildren } from './Sidebar';
|
|
3
|
+
import { Form } from './Form';
|
|
16
4
|
import { NavMenu, NavMenuItem, useNavMenuItem } from './NavMenu';
|
|
5
|
+
import { Provider, useActiveItem, useItems, useSyncWithLocation, useErrorCount, useSetActiveItem, useAddItem, useRemoveItem, useFormRootPath } from './Provider';
|
|
6
|
+
import { Sidebar, SidebarSection, SidebarSectionPosition, useSidebarChildren } from './Sidebar';
|
|
17
7
|
import { Tab, Group, useBaseItemChildren } from './Tab';
|
|
18
8
|
|
|
19
9
|
type IForm = typeof Form & {
|
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
import { Show as RaShow } from 'react-admin';
|
|
2
2
|
import { styled } from '@mui/material/styles';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
4
|
+
export function Show(): JSX.Element {
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
return styled(RaShow, {
|
|
7
|
+
name: 'RaApplicaShow',
|
|
8
|
+
slot: 'root'
|
|
9
|
+
})(({ theme }) => ({
|
|
10
|
+
'&>.MuiToolbar-root:first-of-type': {
|
|
11
|
+
backgroundColor: theme.palette.background.default
|
|
12
|
+
},
|
|
13
|
+
'& .RaShow-card, & > div > div > form': {
|
|
14
|
+
backgroundColor: theme.palette.background.default
|
|
15
|
+
},
|
|
16
|
+
'& .RaShow-main>.MuiPaper-root:first-of-type': {
|
|
17
|
+
// It took me 4 hours to write this line of code and solve a problem with react-sticky-box and Long Forms.
|
|
18
|
+
// The overflow is 'hidden' by default, we need it to be visible to allow react-sticky-box to work and manage visibility with anchors
|
|
19
|
+
// of all the elements inside the page.
|
|
20
|
+
overflow: 'visible'
|
|
21
|
+
}
|
|
22
|
+
}));
|
|
23
|
+
}
|
|
24
|
+
export default Show;
|
|
@@ -5,13 +5,11 @@ import {
|
|
|
5
5
|
SaveButton,
|
|
6
6
|
useRecordContext
|
|
7
7
|
} from 'react-admin';
|
|
8
|
-
|
|
8
|
+
import { styled } from '@mui/system';
|
|
9
|
+
import { useResourceTitle } from '../../hooks';
|
|
9
10
|
import ActionsMenu from '../ActionsMenu';
|
|
10
11
|
import MainCard from '../MainCard';
|
|
11
|
-
import PropTypes from 'prop-types';
|
|
12
12
|
import Toolbar from './Toolbar';
|
|
13
|
-
import { styled } from '@mui/system';
|
|
14
|
-
import { useResourceTitle } from '../../hooks';
|
|
15
13
|
|
|
16
14
|
const ApplicaStyledSimpleForm = styled(RaSimpleForm, {
|
|
17
15
|
name: 'RaApplicaSimpleForm',
|
|
@@ -33,11 +31,25 @@ export type SimpleFormProps = RaSimpleFormProps & {
|
|
|
33
31
|
secondary?: string | React.ReactNode;
|
|
34
32
|
};
|
|
35
33
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
export function SimpleForm({
|
|
35
|
+
title,
|
|
36
|
+
modal = false,
|
|
37
|
+
// @ts-ignore
|
|
38
|
+
content = false,
|
|
39
|
+
subheader = null,
|
|
40
|
+
toolbar = (
|
|
41
|
+
<Toolbar>
|
|
42
|
+
<SaveButton type="button" />
|
|
43
|
+
</Toolbar>
|
|
44
|
+
),
|
|
45
|
+
secondary = (
|
|
46
|
+
<ActionsMenu>
|
|
47
|
+
<DeleteWithConfirmButton />
|
|
48
|
+
</ActionsMenu>
|
|
49
|
+
),
|
|
50
|
+
sx,
|
|
51
|
+
...props
|
|
52
|
+
}: SimpleFormProps): JSX.Element {
|
|
41
53
|
const cardTitle = useResourceTitle(title);
|
|
42
54
|
const record = useRecordContext();
|
|
43
55
|
return (
|
|
@@ -59,36 +71,7 @@ const SimpleForm = ({ title, modal, content, subheader, secondary, sx, ...props
|
|
|
59
71
|
divider
|
|
60
72
|
>
|
|
61
73
|
{/* @ts-ignore */}
|
|
62
|
-
<ApplicaStyledSimpleForm toolbar={
|
|
74
|
+
<ApplicaStyledSimpleForm toolbar={toolbar} {...props} />
|
|
63
75
|
</MainCard>
|
|
64
76
|
);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
SimpleForm.defaultProps = {
|
|
68
|
-
modal: false,
|
|
69
|
-
content: false,
|
|
70
|
-
subheader: null,
|
|
71
|
-
title: null,
|
|
72
|
-
toolbar: (
|
|
73
|
-
<Toolbar>
|
|
74
|
-
<SaveButton type="button" />
|
|
75
|
-
</Toolbar>
|
|
76
|
-
),
|
|
77
|
-
secondary: (
|
|
78
|
-
<ActionsMenu>
|
|
79
|
-
<DeleteWithConfirmButton />
|
|
80
|
-
</ActionsMenu>
|
|
81
|
-
)
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
SimpleForm.propTypes = {
|
|
85
|
-
...RaSimpleForm.propTypes,
|
|
86
|
-
modal: PropTypes.bool,
|
|
87
|
-
content: PropTypes.bool,
|
|
88
|
-
contained: PropTypes.bool,
|
|
89
|
-
subheader: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
90
|
-
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
91
|
-
secondary: PropTypes.oneOfType([PropTypes.node, PropTypes.string, PropTypes.object])
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
export default SimpleForm;
|
|
77
|
+
}
|
|
@@ -1,30 +1,32 @@
|
|
|
1
1
|
import { SimpleFormIterator as RaSimpleFormIterator } from 'react-admin';
|
|
2
2
|
import { styled } from '@mui/material/styles';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
4
|
+
export function SimpleFormIterator(): JSX.Element {
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
return styled(RaSimpleFormIterator, {
|
|
7
|
+
name: 'ApplicaSimpleFormIterator',
|
|
8
|
+
root: 'root'
|
|
9
|
+
})(({ theme }) => ({
|
|
10
|
+
'& .RaSimpleFormIterator-line': {
|
|
11
|
+
paddingTop: theme.spacing(1),
|
|
12
|
+
paddingBottom: theme.spacing(0.5)
|
|
13
|
+
},
|
|
14
|
+
'& .RaSimpleFormIterator-action': {
|
|
15
|
+
display: 'flex',
|
|
16
|
+
flexDirection: 'row',
|
|
17
|
+
alignItems: 'center',
|
|
18
|
+
mb: 1.5
|
|
19
|
+
},
|
|
20
|
+
'& section': {
|
|
21
|
+
width: '100%',
|
|
22
|
+
'& label': {
|
|
23
|
+
position: 'relative',
|
|
24
|
+
overflow: 'visible',
|
|
25
|
+
transform: 'none',
|
|
26
|
+
marginLeft: 0
|
|
27
|
+
}
|
|
26
28
|
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
29
31
|
|
|
30
32
|
export default SimpleFormIterator;
|