@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
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { Box } from '@mui/material';
|
|
2
|
+
import { styled } from '@mui/system';
|
|
1
3
|
import {
|
|
2
4
|
TabbedForm as RaTabbedForm,
|
|
3
5
|
TabbedFormProps as RaTabbedFormProps,
|
|
@@ -5,12 +7,10 @@ import {
|
|
|
5
7
|
SaveButton,
|
|
6
8
|
TabProps
|
|
7
9
|
} from 'react-admin';
|
|
8
|
-
import MainCard from '../MainCard';
|
|
9
10
|
import { useResourceTitle } from '../../hooks';
|
|
10
|
-
import Toolbar from './Toolbar';
|
|
11
|
-
import { styled } from '@mui/system';
|
|
12
11
|
import ActionsMenu from '../ActionsMenu';
|
|
13
|
-
import
|
|
12
|
+
import MainCard from '../MainCard';
|
|
13
|
+
import Toolbar from './Toolbar';
|
|
14
14
|
|
|
15
15
|
export type TabbedFormProps = RaTabbedFormProps & {
|
|
16
16
|
modal?: boolean;
|
|
@@ -40,10 +40,30 @@ const StyledTabbedForm = styled(RaTabbedForm, {
|
|
|
40
40
|
}
|
|
41
41
|
}));
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
function TabbedFormWithNoPadding({ children }: { children: React.ReactNode }): JSX.Element {
|
|
44
|
+
return <>{children}</>;
|
|
45
|
+
}
|
|
44
46
|
|
|
45
|
-
|
|
46
|
-
const {
|
|
47
|
+
export function TabbedForm(props: TabbedFormProps): JSX.Element {
|
|
48
|
+
const {
|
|
49
|
+
title: _title,
|
|
50
|
+
modal,
|
|
51
|
+
content,
|
|
52
|
+
subheader,
|
|
53
|
+
secondary = (
|
|
54
|
+
<ActionsMenu>
|
|
55
|
+
<DeleteWithConfirmButton />
|
|
56
|
+
</ActionsMenu>
|
|
57
|
+
),
|
|
58
|
+
sx,
|
|
59
|
+
noPadding,
|
|
60
|
+
toolbar = (
|
|
61
|
+
<Toolbar>
|
|
62
|
+
<SaveButton type="button" />
|
|
63
|
+
</Toolbar>
|
|
64
|
+
),
|
|
65
|
+
...rest
|
|
66
|
+
} = props;
|
|
47
67
|
const title = useResourceTitle(_title);
|
|
48
68
|
|
|
49
69
|
return (
|
|
@@ -72,10 +92,10 @@ const TabbedForm = (props: TabbedFormProps) => {
|
|
|
72
92
|
divider
|
|
73
93
|
>
|
|
74
94
|
{/** @ts-ignore */}
|
|
75
|
-
<StyledTabbedForm toolbar={
|
|
95
|
+
<StyledTabbedForm toolbar={toolbar} component={noPadding ? TabbedFormWithNoPadding : undefined} {...rest} />
|
|
76
96
|
</MainCard>
|
|
77
97
|
);
|
|
78
|
-
}
|
|
98
|
+
}
|
|
79
99
|
export type StackTabProps = TabProps & {
|
|
80
100
|
children: React.ReactNode;
|
|
81
101
|
};
|
|
@@ -84,24 +104,13 @@ export type StackTabProps = TabProps & {
|
|
|
84
104
|
* Useful when you have tabbed form with noPadding and you want to add padding to the tabs.
|
|
85
105
|
* This component render inside a TabbedForm with noPadding and add padding to the tabs.
|
|
86
106
|
*/
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
<
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
toolbar: (
|
|
95
|
-
<Toolbar>
|
|
96
|
-
<SaveButton type="button" />
|
|
97
|
-
</Toolbar>
|
|
98
|
-
),
|
|
99
|
-
secondary: (
|
|
100
|
-
<ActionsMenu>
|
|
101
|
-
<DeleteWithConfirmButton />
|
|
102
|
-
</ActionsMenu>
|
|
103
|
-
)
|
|
104
|
-
};
|
|
107
|
+
function TabStack({ children, ...props }: StackTabProps): JSX.Element {
|
|
108
|
+
return (
|
|
109
|
+
<RaTabbedForm.Tab {...props}>
|
|
110
|
+
<Box sx={{ width: '100%', p: 2.5 }}>{children}</Box>
|
|
111
|
+
</RaTabbedForm.Tab>
|
|
112
|
+
);
|
|
113
|
+
}
|
|
105
114
|
|
|
106
115
|
TabbedForm.Tab = RaTabbedForm.Tab;
|
|
107
116
|
TabbedForm.TabStack = TabStack;
|
|
@@ -19,7 +19,6 @@ import { FormDataConsumer, RaRecord, useRecordContext, useTranslate, useTranslat
|
|
|
19
19
|
import { styled, useTheme } from '@mui/material/styles';
|
|
20
20
|
import ActionsMenu from '../../ActionsMenu';
|
|
21
21
|
import { PlusCircleOutlined } from '@ant-design/icons';
|
|
22
|
-
import PropTypes from 'prop-types';
|
|
23
22
|
import { TableFormIteratorContext } from '../../../contexts';
|
|
24
23
|
import { TableFormIteratorItem } from './TableFormIteratorItem';
|
|
25
24
|
import { UseFieldArrayReturn, useFormContext } from 'react-hook-form';
|
|
@@ -43,7 +42,7 @@ import get from 'lodash/get';
|
|
|
43
42
|
* @param props
|
|
44
43
|
* @returns
|
|
45
44
|
*/
|
|
46
|
-
|
|
45
|
+
export function RawTableFormIterator(props: TableFormIteratorProps): ReactElement | null {
|
|
47
46
|
const {
|
|
48
47
|
children,
|
|
49
48
|
resource,
|
|
@@ -252,9 +251,9 @@ const TableFormIterator = (props: TableFormIteratorProps) => {
|
|
|
252
251
|
</div>
|
|
253
252
|
</TableFormIteratorContext.Provider>
|
|
254
253
|
) : null;
|
|
255
|
-
}
|
|
254
|
+
}
|
|
256
255
|
|
|
257
|
-
|
|
256
|
+
function AddTableRow(props: any): JSX.Element {
|
|
258
257
|
const { label, disableAdd, onClick, inset } = props;
|
|
259
258
|
const theme = useTheme();
|
|
260
259
|
// @ts-ignore
|
|
@@ -276,9 +275,9 @@ const AddTableRow = (props: any) => {
|
|
|
276
275
|
))}
|
|
277
276
|
</Stack>
|
|
278
277
|
);
|
|
279
|
-
}
|
|
278
|
+
}
|
|
280
279
|
|
|
281
|
-
const
|
|
280
|
+
export const TableFormIterator = styled(RawTableFormIterator, {
|
|
282
281
|
name: 'RaApplicaTableFormIterator',
|
|
283
282
|
slot: 'Root'
|
|
284
283
|
})(({ theme }) => ({
|
|
@@ -295,33 +294,6 @@ const StyledTableFormIterator = styled(TableFormIterator, {
|
|
|
295
294
|
}
|
|
296
295
|
}));
|
|
297
296
|
|
|
298
|
-
AddTableRow.propTypes = {
|
|
299
|
-
label: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
|
|
300
|
-
source: PropTypes.string,
|
|
301
|
-
defaultValue: PropTypes.any
|
|
302
|
-
};
|
|
303
|
-
|
|
304
|
-
TableFormIterator.propTypes = {
|
|
305
|
-
addButton: PropTypes.element,
|
|
306
|
-
children: PropTypes.node,
|
|
307
|
-
className: PropTypes.string,
|
|
308
|
-
field: PropTypes.object,
|
|
309
|
-
fields: PropTypes.array,
|
|
310
|
-
fieldState: PropTypes.object,
|
|
311
|
-
formState: PropTypes.object,
|
|
312
|
-
record: PropTypes.object,
|
|
313
|
-
source: PropTypes.string,
|
|
314
|
-
label: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
|
|
315
|
-
resource: PropTypes.string,
|
|
316
|
-
translate: PropTypes.func,
|
|
317
|
-
disableAdd: PropTypes.bool,
|
|
318
|
-
enableClearAll: PropTypes.bool,
|
|
319
|
-
disableRemove: PropTypes.oneOfType([PropTypes.func, PropTypes.bool]),
|
|
320
|
-
TransitionProps: PropTypes.shape({}),
|
|
321
|
-
empty: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
|
|
322
|
-
template: PropTypes.object
|
|
323
|
-
};
|
|
324
|
-
|
|
325
297
|
export interface TableFormIteratorProps extends Partial<UseFieldArrayReturn> {
|
|
326
298
|
addButton?: ReactElement;
|
|
327
299
|
children?: ReactNode;
|
|
@@ -345,4 +317,4 @@ export interface TableFormIteratorProps extends Partial<UseFieldArrayReturn> {
|
|
|
345
317
|
inset?: boolean;
|
|
346
318
|
}
|
|
347
319
|
|
|
348
|
-
export default
|
|
320
|
+
export default TableFormIterator;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
1
|
import { Children, ReactElement, ReactNode, cloneElement, isValidElement, useMemo } from 'react';
|
|
4
2
|
import { Confirm, useTranslate } from 'react-admin';
|
|
3
|
+
import { RaRecord } from 'ra-core';
|
|
5
4
|
import { Stack, TableCell, Typography } from '@mui/material';
|
|
6
5
|
import { TableFormIteratorItemContext, TableFormIteratorItemContextValue } from '../../../contexts';
|
|
7
|
-
import ActionsMenu from '../../ActionsMenu';
|
|
8
|
-
import { RaRecord } from 'ra-core';
|
|
9
6
|
import { useTableFormIterator } from '../../../hooks';
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import ActionsMenu from '../../ActionsMenu';
|
|
10
9
|
|
|
11
10
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
12
11
|
export const TableFormIteratorItem = React.forwardRef((props: TableFormIteratorItemProps, ref: any) => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Toolbar as RaToolbar } from 'react-admin';
|
|
2
1
|
import { styled } from '@mui/system';
|
|
2
|
+
import { Toolbar as RaToolbar, ToolbarProps } from 'react-admin';
|
|
3
3
|
|
|
4
4
|
const StyledToolbar = styled(RaToolbar, {
|
|
5
5
|
name: 'RaApplicaToolbar',
|
|
6
6
|
slot: 'Root'
|
|
7
|
-
})(({ theme }) => ({
|
|
7
|
+
})(({ theme }: { theme: any }) => ({
|
|
8
8
|
...theme.mixins.toolbar,
|
|
9
9
|
backgroundColor: theme.palette.background.paper,
|
|
10
10
|
justifyContent: 'flex-end',
|
|
@@ -21,14 +21,9 @@ const StyledToolbar = styled(RaToolbar, {
|
|
|
21
21
|
}
|
|
22
22
|
}));
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
Toolbar.propTypes = {
|
|
31
|
-
...RaToolbar.propTypes
|
|
32
|
-
};
|
|
24
|
+
export function Toolbar(props: ToolbarProps): JSX.Element {
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
return <StyledToolbar {...props} />;
|
|
27
|
+
}
|
|
33
28
|
|
|
34
29
|
export default Toolbar;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './CardForm';
|
|
2
|
+
export * from './ChangePasswordForm';
|
|
3
|
+
export * from './Create';
|
|
4
|
+
export * from './Edit';
|
|
5
|
+
export * from './FormHeader';
|
|
6
|
+
export * from './LongForm';
|
|
7
|
+
export * from './Show';
|
|
8
|
+
export * from './SimpleForm';
|
|
9
|
+
export * from './SimpleFormIterator';
|
|
10
|
+
export * from './TabbedForm';
|
|
11
|
+
export * from './TableForm';
|
|
12
|
+
export * from './Toolbar';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import LabeledArrayInput, { LabeledArrayInputProps } from './LabeledArrayInput';
|
|
2
1
|
import { ArrayInput as RaArrayInput, ArrayInputProps as RaArrayInputProps } from 'react-admin';
|
|
3
|
-
|
|
4
2
|
import { styled } from '@mui/material/styles';
|
|
3
|
+
import LabeledArrayInput, { LabeledArrayInputProps } from './LabeledArrayInput';
|
|
5
4
|
|
|
6
5
|
const StyledArrayInput = styled(RaArrayInput, {
|
|
7
6
|
name: 'ApplicaArrayInput',
|
|
@@ -34,17 +33,18 @@ export type ArrayInputProps = RaArrayInputProps &
|
|
|
34
33
|
* @param {ArrayInputProps}
|
|
35
34
|
* @returns {React.ReactElement}
|
|
36
35
|
*/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
36
|
+
export function ArrayInput({ label, addLabel, source, helperText, divider = true, ...props }: ArrayInputProps): React.ReactElement {
|
|
37
|
+
return (
|
|
38
|
+
<LabeledArrayInput
|
|
39
|
+
label={label}
|
|
40
|
+
addLabel={addLabel}
|
|
41
|
+
source={source}
|
|
42
|
+
helperText={helperText}
|
|
43
|
+
divider={divider}
|
|
44
|
+
fullWidth={props?.fullWidth}
|
|
45
|
+
>
|
|
46
|
+
<StyledArrayInput source={source} label={false} {...props} />
|
|
47
|
+
</LabeledArrayInput>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
50
|
export default ArrayInput;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
/* eslint-disable no-console */
|
|
2
|
-
import { FileInputProps, FileInput as RaFileInput, useInput, useRecordContext } from 'react-admin';
|
|
3
|
-
|
|
4
1
|
import { AttachmentField } from '../ra-fields';
|
|
2
|
+
import { FileInputProps, FileInput as RaFileInput, useInput, useRecordContext } from 'react-admin';
|
|
3
|
+
import { styled } from '@mui/material/styles';
|
|
5
4
|
import LabeledInput from './LabeledInput';
|
|
6
|
-
import PropTypes from 'prop-types';
|
|
7
5
|
import React from 'react';
|
|
8
|
-
import { styled } from '@mui/material/styles';
|
|
9
6
|
|
|
10
7
|
const removeDeleteIfNecessary = (disabled: boolean) => {
|
|
11
8
|
if (disabled) {
|
|
@@ -56,7 +53,7 @@ export type AttachmentInputProps = FileInputProps & {
|
|
|
56
53
|
};
|
|
57
54
|
|
|
58
55
|
/**
|
|
59
|
-
*
|
|
56
|
+
* Allows you to define an input field inside which you can upload one or more files.
|
|
60
57
|
*
|
|
61
58
|
* @example
|
|
62
59
|
* <AttachmentInput source="attachments" title="name" accept="image/*" multiple>
|
|
@@ -64,33 +61,28 @@ export type AttachmentInputProps = FileInputProps & {
|
|
|
64
61
|
* @param {AttachmentInputProps}
|
|
65
62
|
* @returns
|
|
66
63
|
*/
|
|
67
|
-
|
|
64
|
+
export function AttachmentInput({
|
|
65
|
+
// @ts-ignore
|
|
66
|
+
children = <AttachmentField title="name" source="path" />,
|
|
67
|
+
multiple = true,
|
|
68
|
+
disabled = false,
|
|
69
|
+
type = 'attachment',
|
|
70
|
+
...props
|
|
71
|
+
}: AttachmentInputProps): JSX.Element {
|
|
68
72
|
const record = useRecordContext(props);
|
|
69
73
|
const property = props?.source;
|
|
70
74
|
const entityId = record?.id;
|
|
71
75
|
useInput({ source: `__${type}__${props?.source}`, defaultValue: props?.source });
|
|
72
76
|
return (
|
|
73
77
|
/** @ts-ignore */
|
|
74
|
-
<LabeledInput {...props}>
|
|
78
|
+
<LabeledInput {...props} disabled={disabled}>
|
|
75
79
|
{/** @ts-ignore */}
|
|
76
|
-
<StyledFileInput
|
|
80
|
+
<StyledFileInput type={type} multiple={multiple} disabled={disabled}>
|
|
81
|
+
{/* @ts-ignore */}
|
|
82
|
+
{React.cloneElement(children, { ...children.props, entityId, property })}
|
|
83
|
+
</StyledFileInput>
|
|
77
84
|
</LabeledInput>
|
|
78
85
|
);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
AttachmentInput.propTypes = {
|
|
82
|
-
...RaFileInput.propTypes,
|
|
83
|
-
children: PropTypes.node,
|
|
84
|
-
multiple: PropTypes.bool,
|
|
85
|
-
disabled: PropTypes.bool
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
AttachmentInput.defaultProps = {
|
|
89
|
-
/** @ts-ignore */
|
|
90
|
-
children: <AttachmentField title="name" source="path" />,
|
|
91
|
-
multiple: true,
|
|
92
|
-
disabled: false,
|
|
93
|
-
type: 'attachment'
|
|
94
|
-
};
|
|
86
|
+
}
|
|
95
87
|
|
|
96
88
|
export default AttachmentInput;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AutocompleteArrayInputProps, AutocompleteArrayInput as RaAutocompleteArrayInput } from 'react-admin';
|
|
2
|
+
import { styled } from '@mui/material/styles';
|
|
3
|
+
import LabeledInput from './LabeledInput';
|
|
4
|
+
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
const StyledAutocompleteArrayInput = styled(RaAutocompleteArrayInput, {
|
|
7
|
+
name: 'StyledAutocompleteInput',
|
|
8
|
+
root: 'root'
|
|
9
|
+
})(({ label }) => ({
|
|
10
|
+
'& legend': {
|
|
11
|
+
width: label === false ? 0 : 'auto'
|
|
12
|
+
},
|
|
13
|
+
'& .MuiAutocomplete-inputRoot': {
|
|
14
|
+
padding: `0px 9px`
|
|
15
|
+
}
|
|
16
|
+
}));
|
|
17
|
+
|
|
18
|
+
export function AutocompleteArrayInput({ size = 'small', ...props }: AutocompleteArrayInputProps): JSX.Element {
|
|
19
|
+
return (
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
<LabeledInput {...props}>
|
|
22
|
+
<StyledAutocompleteArrayInput size={size} />
|
|
23
|
+
</LabeledInput>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export default AutocompleteArrayInput;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { AutocompleteInput as RaAutocompleteInput } from 'react-admin';
|
|
1
|
+
import { AutocompleteInputProps, AutocompleteInput as RaAutocompleteInput } from 'react-admin';
|
|
3
2
|
import { styled } from '@mui/material/styles';
|
|
3
|
+
import LabeledInput from './LabeledInput';
|
|
4
4
|
|
|
5
|
+
// @ts-ignore
|
|
5
6
|
const StyledAutocompleteInput = styled(RaAutocompleteInput, {
|
|
6
7
|
name: 'StyledAutocompleteInput',
|
|
7
8
|
root: 'root'
|
|
@@ -9,11 +10,7 @@ const StyledAutocompleteInput = styled(RaAutocompleteInput, {
|
|
|
9
10
|
'& legend': {
|
|
10
11
|
width: label === false ? 0 : 'auto'
|
|
11
12
|
},
|
|
12
|
-
// '& label.MuiFormLabel-root[data-shrink="false"]': {
|
|
13
|
-
// minHeight: '18px'
|
|
14
|
-
// },
|
|
15
13
|
'& .MuiAutocomplete-inputRoot': {
|
|
16
|
-
// Serve ad allineare l'altezza di un input di tipo Autocomplete a quella degli altri campi utilizzati.
|
|
17
14
|
padding: `0px 9px`
|
|
18
15
|
},
|
|
19
16
|
'& .MuiOutlinedInput-root.MuiInputBase-sizeSmall': {
|
|
@@ -21,24 +18,17 @@ const StyledAutocompleteInput = styled(RaAutocompleteInput, {
|
|
|
21
18
|
}
|
|
22
19
|
}));
|
|
23
20
|
|
|
24
|
-
|
|
21
|
+
export function AutocompleteInput({ size = 'small', ...props }: AutocompleteInputProps): JSX.Element {
|
|
25
22
|
// Sanitize props removing "perPage":
|
|
23
|
+
// @ts-ignore
|
|
26
24
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
27
25
|
const { perPage, ...rest } = props;
|
|
28
26
|
return (
|
|
27
|
+
// @ts-ignore
|
|
29
28
|
<LabeledInput {...rest}>
|
|
30
|
-
<StyledAutocompleteInput />
|
|
29
|
+
<StyledAutocompleteInput size={size} />
|
|
31
30
|
</LabeledInput>
|
|
32
31
|
);
|
|
33
|
-
}
|
|
34
|
-
AutocompleteInput.propTypes = {
|
|
35
|
-
...RaAutocompleteInput.propTypes,
|
|
36
|
-
...LabeledInput.propTypes
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
AutocompleteInput.defaultProps = {
|
|
40
|
-
...RaAutocompleteInput.defaultProps,
|
|
41
|
-
size: 'small'
|
|
42
|
-
};
|
|
32
|
+
}
|
|
43
33
|
|
|
44
34
|
export default AutocompleteInput;
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
+
import { BooleanInputProps, BooleanInput as RaBooleanInput } from 'react-admin';
|
|
1
2
|
import { styled } from '@mui/material/styles';
|
|
2
3
|
import { useTheme } from '@emotion/react';
|
|
3
4
|
import LabeledInput from './LabeledInput';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
|
-
import { BooleanInput as RaBooleanInput } from 'react-admin';
|
|
6
5
|
|
|
7
|
-
const
|
|
6
|
+
const StyledBooleanInput = styled(RaBooleanInput, {
|
|
8
7
|
name: 'RaApplicaBooleanInput',
|
|
9
8
|
slot: 'Root'
|
|
10
9
|
})(() => ({
|
|
11
10
|
marginTop: '0 !important'
|
|
12
11
|
}));
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
export function BooleanInput({ ...props }: BooleanInputProps): JSX.Element {
|
|
15
14
|
const theme = useTheme();
|
|
16
15
|
return (
|
|
16
|
+
// @ts-ignore
|
|
17
17
|
<LabeledInput {...props}>
|
|
18
|
-
|
|
18
|
+
{/** @ts-ignore */}
|
|
19
|
+
<StyledBooleanInput
|
|
19
20
|
sx={{
|
|
20
21
|
'& .MuiFormControlLabel-root': {
|
|
21
22
|
marginLeft: '0 !important',
|
|
@@ -23,21 +24,13 @@ const BooleanInput = ({ ...props }) => {
|
|
|
23
24
|
},
|
|
24
25
|
'& .MuiSwitch-root': {
|
|
25
26
|
margin: '0 !important',
|
|
27
|
+
// @ts-ignore
|
|
26
28
|
marginTop: props.display === 'legend' ? 0 : `${theme.spacing(1)} !important`
|
|
27
29
|
}
|
|
28
30
|
}}
|
|
29
31
|
/>
|
|
30
32
|
</LabeledInput>
|
|
31
33
|
);
|
|
32
|
-
}
|
|
33
|
-
BooleanInput.defaultProps = {
|
|
34
|
-
...RaBooleanInput.defaultProps,
|
|
35
|
-
...LabeledInput.defaultProps
|
|
36
|
-
};
|
|
37
|
-
BooleanInput.propTypes = {
|
|
38
|
-
...RaBooleanInput.propTypes,
|
|
39
|
-
...LabeledInput.propTypes,
|
|
40
|
-
horizontal: PropTypes.bool
|
|
41
|
-
};
|
|
34
|
+
}
|
|
42
35
|
|
|
43
36
|
export default BooleanInput;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DateInputProps, DateInput as RaDateInput } from 'react-admin';
|
|
2
|
+
import { styled } from '@mui/material/styles';
|
|
3
|
+
import LabeledInput from './LabeledInput';
|
|
4
|
+
|
|
5
|
+
const StyledDateInput = styled(RaDateInput, {
|
|
6
|
+
name: 'RaApplicaDateInput',
|
|
7
|
+
slot: 'root'
|
|
8
|
+
})(({ label }) => ({
|
|
9
|
+
'& legend': {
|
|
10
|
+
width: label === false ? 0 : 'auto'
|
|
11
|
+
}
|
|
12
|
+
}));
|
|
13
|
+
|
|
14
|
+
export function DateInput(props: DateInputProps): JSX.Element {
|
|
15
|
+
return (
|
|
16
|
+
// @ts-ignore
|
|
17
|
+
<LabeledInput {...props}>
|
|
18
|
+
{/** @ts-ignore */}
|
|
19
|
+
<StyledDateInput />
|
|
20
|
+
</LabeledInput>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export default DateInput;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { DateTimeInputProps, DateTimeInput as RaDateTimeInput } from 'react-admin';
|
|
2
|
-
|
|
3
|
-
import LabeledInput from './LabeledInput';
|
|
4
2
|
import { styled } from '@mui/material/styles';
|
|
3
|
+
import LabeledInput from './LabeledInput';
|
|
5
4
|
|
|
6
5
|
const StyledDateInput = styled(RaDateTimeInput, {
|
|
7
6
|
name: 'RaApplicaDateTimeInput',
|
|
@@ -12,21 +11,14 @@ const StyledDateInput = styled(RaDateTimeInput, {
|
|
|
12
11
|
}
|
|
13
12
|
}));
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
{
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
...RaDateTimeInput.propTypes,
|
|
25
|
-
...LabeledInput.propTypes
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
DateTimeInput.defaultProps = {
|
|
29
|
-
...LabeledInput.defaultProps
|
|
30
|
-
};
|
|
14
|
+
export function DateTimeInput(props: DateTimeInputProps): JSX.Element {
|
|
15
|
+
return (
|
|
16
|
+
/** @ts-ignore */
|
|
17
|
+
<LabeledInput {...props}>
|
|
18
|
+
{/** @ts-ignore */}
|
|
19
|
+
<StyledDateInput />
|
|
20
|
+
</LabeledInput>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
31
23
|
|
|
32
24
|
export default DateTimeInput;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { FileInput as RaFileInput, useRecordContext } from 'react-admin';
|
|
2
|
-
import React, { useMemo } from 'react';
|
|
3
|
-
|
|
4
1
|
import { FileField } from '../ra-fields';
|
|
5
|
-
import
|
|
6
|
-
import PropTypes from 'prop-types';
|
|
2
|
+
import { FileInput as RaFileInput, FileInputProps as RaFileInputProps, useRecordContext } from 'react-admin';
|
|
7
3
|
import { get } from 'lodash';
|
|
8
4
|
import { styled } from '@mui/material/styles';
|
|
9
5
|
import { useWatch } from 'react-hook-form';
|
|
6
|
+
import LabeledInput from './LabeledInput';
|
|
7
|
+
import React, { useMemo } from 'react';
|
|
10
8
|
|
|
11
9
|
const StyledFileInput = styled(RaFileInput, {
|
|
12
10
|
name: 'RaApplicaFileInput',
|
|
@@ -32,6 +30,12 @@ const StyledFileInput = styled(RaFileInput, {
|
|
|
32
30
|
}
|
|
33
31
|
}));
|
|
34
32
|
|
|
33
|
+
export type FileInputProps = {
|
|
34
|
+
source: string;
|
|
35
|
+
title?: string;
|
|
36
|
+
children?: React.ReactNode;
|
|
37
|
+
} & RaFileInputProps;
|
|
38
|
+
|
|
35
39
|
/**
|
|
36
40
|
* FileInput is designed to be used as single input. It does not support multiple files and
|
|
37
41
|
* can be used only for base64 encoded files using applica framework.
|
|
@@ -46,7 +50,7 @@ const StyledFileInput = styled(RaFileInput, {
|
|
|
46
50
|
* in conjuction with Applica Framework backend API services.
|
|
47
51
|
*
|
|
48
52
|
*/
|
|
49
|
-
|
|
53
|
+
export function FileInput({ children = <FileField source="" title="" />, title, ...props }: FileInputProps): JSX.Element {
|
|
50
54
|
const file = useWatch({ name: props.source });
|
|
51
55
|
const record = useRecordContext(props);
|
|
52
56
|
const { source } = props;
|
|
@@ -66,33 +70,28 @@ const FileInput = ({ children, title, ...props }) => {
|
|
|
66
70
|
}, [record, source, file]);
|
|
67
71
|
|
|
68
72
|
return (
|
|
73
|
+
// @ts-ignore
|
|
69
74
|
<LabeledInput {...props}>
|
|
75
|
+
{/* @ts-ignore */}
|
|
70
76
|
<StyledFileInput>
|
|
71
|
-
{
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
77
|
+
{
|
|
78
|
+
/** @ts-ignore */
|
|
79
|
+
React.cloneElement(children, {
|
|
80
|
+
// @ts-ignore
|
|
81
|
+
...children.props,
|
|
82
|
+
title: title || source,
|
|
83
|
+
source,
|
|
84
|
+
record: {
|
|
85
|
+
...record,
|
|
86
|
+
[source]: file?.title || get(record, source),
|
|
87
|
+
[`_${source}`]: file?.src || get(record, `_${source}`),
|
|
88
|
+
[title || source]: filename
|
|
89
|
+
}
|
|
90
|
+
})
|
|
91
|
+
}
|
|
82
92
|
</StyledFileInput>
|
|
83
93
|
</LabeledInput>
|
|
84
94
|
);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
FileInput.propTypes = {
|
|
88
|
-
...RaFileInput.propTypes,
|
|
89
|
-
source: PropTypes.string,
|
|
90
|
-
title: PropTypes.string,
|
|
91
|
-
children: PropTypes.node
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
FileInput.defaultProps = {
|
|
95
|
-
children: <FileField />
|
|
96
|
-
};
|
|
95
|
+
}
|
|
97
96
|
|
|
98
97
|
export default FileInput;
|