@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,8 +1,6 @@
|
|
|
1
1
|
import { Button, ButtonProps, Stack, Typography } from '@mui/material';
|
|
2
2
|
import { FieldTitle, useRecordContext, useResourceContext } from 'ra-core';
|
|
3
3
|
import React, { ElementType } from 'react';
|
|
4
|
-
|
|
5
|
-
import PropTypes from 'prop-types';
|
|
6
4
|
import { get } from 'lodash';
|
|
7
5
|
import { useAppConfig } from '../../hooks';
|
|
8
6
|
|
|
@@ -47,10 +45,10 @@ const defaultIconStyle = {
|
|
|
47
45
|
* @param {ListItemProps} props
|
|
48
46
|
* @returns {JSX.Element}
|
|
49
47
|
*/
|
|
50
|
-
|
|
48
|
+
export function ListItem({
|
|
51
49
|
source,
|
|
52
50
|
label,
|
|
53
|
-
variant,
|
|
51
|
+
variant = 'body1',
|
|
54
52
|
record: providedRecord,
|
|
55
53
|
spaceBottom,
|
|
56
54
|
spaceTop,
|
|
@@ -60,7 +58,7 @@ const ListItem = ({
|
|
|
60
58
|
button,
|
|
61
59
|
buttonProps,
|
|
62
60
|
...props
|
|
63
|
-
}: ListItemProps): JSX.Element
|
|
61
|
+
}: ListItemProps): JSX.Element {
|
|
64
62
|
const { getCurrentDialog } = useAppConfig();
|
|
65
63
|
const resource = useResourceContext(props as any);
|
|
66
64
|
const dialogResource = getCurrentDialog();
|
|
@@ -109,39 +107,6 @@ const ListItem = ({
|
|
|
109
107
|
</Stack>
|
|
110
108
|
</Stack>
|
|
111
109
|
);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
ListItem.propTypes = {
|
|
115
|
-
source: PropTypes.string,
|
|
116
|
-
label: PropTypes.string,
|
|
117
|
-
record: PropTypes.object,
|
|
118
|
-
variant: PropTypes.oneOf([
|
|
119
|
-
'body1',
|
|
120
|
-
'body2',
|
|
121
|
-
'caption',
|
|
122
|
-
'button',
|
|
123
|
-
'h1',
|
|
124
|
-
'h2',
|
|
125
|
-
'h3',
|
|
126
|
-
'h4',
|
|
127
|
-
'h5',
|
|
128
|
-
'h6',
|
|
129
|
-
'inherit',
|
|
130
|
-
'overline',
|
|
131
|
-
'subtitle1',
|
|
132
|
-
'subtitle2'
|
|
133
|
-
]),
|
|
134
|
-
spaceTop: PropTypes.bool,
|
|
135
|
-
spaceBottom: PropTypes.bool,
|
|
136
|
-
leftIcon: PropTypes.oneOfType([PropTypes.elementType, PropTypes.element, PropTypes.func]),
|
|
137
|
-
rightIcon: PropTypes.oneOfType([PropTypes.elementType, PropTypes.element, PropTypes.func]),
|
|
138
|
-
component: PropTypes.oneOfType([PropTypes.elementType, PropTypes.element, PropTypes.func]),
|
|
139
|
-
buttonProps: PropTypes.object,
|
|
140
|
-
button: PropTypes.string
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
ListItem.defaultProps = {
|
|
144
|
-
variant: 'body1'
|
|
145
|
-
};
|
|
110
|
+
}
|
|
146
111
|
|
|
147
112
|
export default ListItem;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ListItem';
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { CloneButton, DeleteWithConfirmButton, EditButton } from 'react-admin';
|
|
2
|
-
|
|
3
2
|
import ActionsMenu from '../ActionsMenu';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
3
|
|
|
6
|
-
|
|
4
|
+
export type ActionsFieldProps = {
|
|
5
|
+
canEdit?: boolean;
|
|
6
|
+
canDelete?: boolean;
|
|
7
|
+
canClone?: boolean;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export function ActionsField({ canEdit = true, canDelete = true, canClone = false }: ActionsFieldProps): JSX.Element | null {
|
|
7
11
|
if (!canEdit && !canDelete && !canClone) {
|
|
8
12
|
return null;
|
|
9
13
|
}
|
|
@@ -15,18 +19,6 @@ const ActionsField = ({ canEdit, canDelete, canClone }) => {
|
|
|
15
19
|
{canClone && <CloneButton />}
|
|
16
20
|
</ActionsMenu>
|
|
17
21
|
);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
ActionsField.defaultProps = {
|
|
21
|
-
canEdit: true,
|
|
22
|
-
canDelete: true,
|
|
23
|
-
canClone: false
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
ActionsField.propTypes = {
|
|
27
|
-
canEdit: PropTypes.bool,
|
|
28
|
-
canDelete: PropTypes.bool,
|
|
29
|
-
canClone: PropTypes.bool
|
|
30
|
-
};
|
|
22
|
+
}
|
|
31
23
|
|
|
32
24
|
export default ActionsField;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import BaseAttachmentField, { BaseAttachmentFieldProps } from './BaseAttachmentField';
|
|
2
2
|
import { Box, Typography } from '@mui/material';
|
|
3
|
-
import {
|
|
3
|
+
import { useDataProvider, useRecordContext, useResourceContext, useTranslate } from 'react-admin';
|
|
4
4
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
5
5
|
|
|
6
|
-
import PropTypes from 'prop-types';
|
|
7
6
|
import dayjs from 'dayjs';
|
|
8
7
|
import { get } from 'lodash';
|
|
9
8
|
|
|
@@ -23,14 +22,14 @@ export type AttachmentFieldProps = BaseAttachmentFieldProps & {
|
|
|
23
22
|
showUser?: boolean;
|
|
24
23
|
};
|
|
25
24
|
|
|
26
|
-
|
|
25
|
+
export function AttachmentField({
|
|
27
26
|
entityId,
|
|
28
27
|
property,
|
|
29
28
|
disabled,
|
|
30
29
|
showUser = false,
|
|
31
30
|
userResource = 'entities/user',
|
|
32
31
|
...props
|
|
33
|
-
}: AttachmentFieldProps)
|
|
32
|
+
}: AttachmentFieldProps): JSX.Element {
|
|
34
33
|
const [user, setUser] = useState<any>(null);
|
|
35
34
|
const record = useRecordContext(props);
|
|
36
35
|
const dataProvider = useDataProvider();
|
|
@@ -91,14 +90,5 @@ const AttachmentField = ({
|
|
|
91
90
|
}
|
|
92
91
|
/>
|
|
93
92
|
);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
AttachmentField.propTypes = {
|
|
97
|
-
// @ts-ignore
|
|
98
|
-
...RaFileField.propTypes,
|
|
99
|
-
source: PropTypes.string,
|
|
100
|
-
title: PropTypes.string,
|
|
101
|
-
disabled: PropTypes.bool
|
|
102
|
-
};
|
|
103
|
-
|
|
93
|
+
}
|
|
104
94
|
export default AttachmentField;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { useRecordContext, useTranslate } from 'ra-core';
|
|
2
|
-
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
2
|
import { Typography } from '@mui/material';
|
|
5
3
|
import { get } from 'lodash';
|
|
6
4
|
import { styled } from '@mui/material/styles';
|
|
@@ -31,7 +29,7 @@ export type BaseAttachmentFieldProps = {
|
|
|
31
29
|
onClick: (e: any) => void;
|
|
32
30
|
};
|
|
33
31
|
|
|
34
|
-
export
|
|
32
|
+
export function BaseAttachmentField(props: BaseAttachmentFieldProps): JSX.Element | any {
|
|
35
33
|
const { className, emptyText, source, title, ...rest } = props;
|
|
36
34
|
const record = useRecordContext(props);
|
|
37
35
|
const sourceValue = get(record, source);
|
|
@@ -65,18 +63,6 @@ export const BaseAttachmentField = (props: BaseAttachmentFieldProps): JSX.Elemen
|
|
|
65
63
|
{titleValue}
|
|
66
64
|
</Root>
|
|
67
65
|
);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
BaseAttachmentField.propTypes = {
|
|
71
|
-
className: PropTypes.string,
|
|
72
|
-
emptyText: PropTypes.string,
|
|
73
|
-
source: PropTypes.string.isRequired,
|
|
74
|
-
src: PropTypes.string,
|
|
75
|
-
title: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
76
|
-
target: PropTypes.string,
|
|
77
|
-
download: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
78
|
-
ping: PropTypes.string,
|
|
79
|
-
rel: PropTypes.string
|
|
80
|
-
};
|
|
66
|
+
}
|
|
81
67
|
|
|
82
68
|
export default BaseAttachmentField;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
|
-
import { useRecordContext } from 'react-admin';
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { ImageField } from './ImageField';
|
|
3
|
+
import { FieldProps, useRecordContext } from 'react-admin';
|
|
6
4
|
|
|
5
|
+
export type CoverFieldProps = {
|
|
6
|
+
width?: number | string;
|
|
7
|
+
height?: number | string;
|
|
8
|
+
circle?: boolean;
|
|
9
|
+
justify?: 'flex-start' | 'center' | 'flex-end';
|
|
10
|
+
} & FieldProps;
|
|
7
11
|
/**
|
|
8
12
|
* A component that displays an image in a circle or square (with minimum radius).
|
|
9
13
|
*
|
|
@@ -20,14 +24,14 @@ import { useRecordContext } from 'react-admin';
|
|
|
20
24
|
* // With custom width/height:
|
|
21
25
|
* <CoverField source="image" width={100} height={100} />
|
|
22
26
|
*/
|
|
23
|
-
|
|
24
|
-
width: defaultWidth,
|
|
25
|
-
height: defaultHeight,
|
|
26
|
-
circle: defaultCircle,
|
|
27
|
-
justify: defaultJustify,
|
|
27
|
+
export function CoverField({
|
|
28
|
+
width: defaultWidth = 150,
|
|
29
|
+
height: defaultHeight = 150,
|
|
30
|
+
circle: defaultCircle = false,
|
|
31
|
+
justify: defaultJustify = 'flex-start',
|
|
28
32
|
record: _propRecord,
|
|
29
33
|
...props
|
|
30
|
-
})
|
|
34
|
+
}: CoverFieldProps): JSX.Element {
|
|
31
35
|
const sx = useMemo(
|
|
32
36
|
() => ({
|
|
33
37
|
width: typeof defaultWidth === 'number' ? `${defaultWidth}px !important` : `${defaultWidth} !important`,
|
|
@@ -41,7 +45,7 @@ const CoverField = ({
|
|
|
41
45
|
|
|
42
46
|
return (
|
|
43
47
|
<ImageField
|
|
44
|
-
sx={(theme) => ({
|
|
48
|
+
sx={(theme: any) => ({
|
|
45
49
|
margin: 0,
|
|
46
50
|
display: 'flex',
|
|
47
51
|
justifyContent: defaultJustify,
|
|
@@ -58,20 +62,5 @@ const CoverField = ({
|
|
|
58
62
|
record={record}
|
|
59
63
|
/>
|
|
60
64
|
);
|
|
61
|
-
}
|
|
62
|
-
CoverField.defaultProps = {
|
|
63
|
-
...ImageField.defaultProps,
|
|
64
|
-
width: 150,
|
|
65
|
-
height: 150,
|
|
66
|
-
circle: false,
|
|
67
|
-
justify: 'flex-start'
|
|
68
|
-
};
|
|
69
|
-
CoverField.propTypes = {
|
|
70
|
-
...ImageField.propTypes,
|
|
71
|
-
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
72
|
-
height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
73
|
-
circle: PropTypes.bool,
|
|
74
|
-
justify: PropTypes.oneOf(['flex-start', 'center', 'flex-end'])
|
|
75
|
-
};
|
|
76
|
-
|
|
65
|
+
}
|
|
77
66
|
export default CoverField;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { DateField, useLocaleState, useRecordContext } from 'react-admin';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
1
|
+
import { DateField, DateFieldProps, useLocaleState, useRecordContext } from 'react-admin';
|
|
2
|
+
import { Fragment, useMemo } from 'react';
|
|
5
3
|
import { Typography } from '@mui/material';
|
|
6
4
|
import dayjs from 'dayjs';
|
|
7
5
|
import { get } from 'lodash';
|
|
@@ -11,7 +9,11 @@ import 'dayjs/locale/it';
|
|
|
11
9
|
|
|
12
10
|
dayjs.extend(relativeTime);
|
|
13
11
|
|
|
14
|
-
|
|
12
|
+
export type DateAgoFieldProps = {
|
|
13
|
+
source: string;
|
|
14
|
+
} & DateFieldProps;
|
|
15
|
+
|
|
16
|
+
export function DateAgoField(props: DateAgoFieldProps): JSX.Element {
|
|
15
17
|
const record = useRecordContext(props);
|
|
16
18
|
const [locale] = useLocaleState();
|
|
17
19
|
const fromNow = useMemo(() => dayjs(get(record, props?.source)).locale(locale).fromNow(), [record, props?.source, locale]);
|
|
@@ -25,10 +27,5 @@ const DateAgoField = (props) => {
|
|
|
25
27
|
</Typography>
|
|
26
28
|
</Fragment>
|
|
27
29
|
);
|
|
28
|
-
}
|
|
29
|
-
DateAgoField.displayName = 'DateAgoField';
|
|
30
|
-
DateAgoField.propTypes = {
|
|
31
|
-
source: PropTypes.string.isRequired
|
|
32
|
-
};
|
|
33
|
-
|
|
30
|
+
}
|
|
34
31
|
export default DateAgoField;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DateFieldProps, DateField as RaDateField } from 'react-admin';
|
|
2
|
+
import { styled } from '@mui/material/styles';
|
|
3
|
+
|
|
4
|
+
const StyledDateField = styled(RaDateField, {
|
|
5
|
+
name: 'RaApplicaDateField',
|
|
6
|
+
slot: 'Root'
|
|
7
|
+
})(() => ({}));
|
|
8
|
+
|
|
9
|
+
export function DateField({ variant = 'body1', ...props }: DateFieldProps): JSX.Element {
|
|
10
|
+
// @ts-ignore
|
|
11
|
+
return <StyledDateField {...props} variant={variant} />;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default DateField;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { EmailFieldProps, EmailField as RaEmailField } from 'react-admin';
|
|
2
|
+
import { styled } from '@mui/material/styles';
|
|
3
|
+
|
|
4
|
+
const StyledEmailField = styled(RaEmailField, {
|
|
5
|
+
name: 'RaApplicaEmailField',
|
|
6
|
+
slot: 'Root'
|
|
7
|
+
})(() => ({}));
|
|
8
|
+
|
|
9
|
+
export function EmailField({ variant = 'body1', ...props }: EmailFieldProps): JSX.Element {
|
|
10
|
+
return <StyledEmailField {...props} variant={variant} />;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default EmailField;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { FileField as RaFileField, useRecordContext } from 'react-admin';
|
|
2
|
-
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
1
|
+
import { FileField as RaFileField, FileFieldProps as RaFileFieldProps, useRecordContext } from 'react-admin';
|
|
4
2
|
import { get } from 'lodash';
|
|
5
3
|
import { styled } from '@mui/material/styles';
|
|
6
4
|
import { useCallback } from 'react';
|
|
@@ -10,13 +8,18 @@ const StyledFileField = styled(RaFileField, {
|
|
|
10
8
|
slot: 'root'
|
|
11
9
|
})(() => ({}));
|
|
12
10
|
|
|
11
|
+
export type FileFieldProps = {
|
|
12
|
+
source: string;
|
|
13
|
+
title: string;
|
|
14
|
+
} & RaFileFieldProps;
|
|
15
|
+
|
|
13
16
|
/**
|
|
14
17
|
* This component works with Base64 files.
|
|
15
18
|
*/
|
|
16
|
-
|
|
19
|
+
export function FileField({ ...props }: FileFieldProps): JSX.Element {
|
|
17
20
|
const record = useRecordContext(props);
|
|
18
21
|
const handleClick = useCallback(
|
|
19
|
-
(event) => {
|
|
22
|
+
(event: Event) => {
|
|
20
23
|
event.preventDefault();
|
|
21
24
|
event.stopPropagation();
|
|
22
25
|
const base64 = get(record, `_${props?.source}`, get(record, props?.source));
|
|
@@ -28,13 +31,14 @@ const FileField = ({ ...props }) => {
|
|
|
28
31
|
},
|
|
29
32
|
[props?.source, record, props?.title]
|
|
30
33
|
);
|
|
31
|
-
return
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
return (
|
|
35
|
+
<StyledFileField
|
|
36
|
+
{...props}
|
|
37
|
+
record={record}
|
|
38
|
+
// @ts-ignore
|
|
39
|
+
onClick={handleClick}
|
|
40
|
+
/>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
39
43
|
|
|
40
44
|
export default FileField;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FunctionFieldProps, FunctionField as RaFunctionField } from 'react-admin';
|
|
2
|
+
|
|
3
|
+
export function FunctionField({ variant = 'body1', ...props }: FunctionFieldProps): JSX.Element {
|
|
4
|
+
return <RaFunctionField {...props} variant={variant} />;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export default FunctionField;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ImageField as RaImageField } from 'react-admin';
|
|
1
|
+
import { ImageFieldProps, ImageField as RaImageField } from 'react-admin';
|
|
3
2
|
import { styled } from '@mui/material/styles';
|
|
4
3
|
|
|
5
4
|
const StyledImageField = styled(RaImageField, {
|
|
@@ -7,14 +6,9 @@ const StyledImageField = styled(RaImageField, {
|
|
|
7
6
|
slot: 'root'
|
|
8
7
|
})(() => ({}));
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
export function ImageField(props: ImageFieldProps): JSX.Element {
|
|
11
10
|
const source = `_${props?.source}`;
|
|
12
11
|
return <StyledImageField {...props} source={source} />;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
ImageField.propTypes = {
|
|
16
|
-
...RaImageField.propTypes,
|
|
17
|
-
source: PropTypes.string
|
|
18
|
-
};
|
|
12
|
+
}
|
|
19
13
|
|
|
20
14
|
export default ImageField;
|
|
@@ -2,16 +2,16 @@ import _ from 'lodash';
|
|
|
2
2
|
import { TextFieldProps } from 'ra-ui-materialui';
|
|
3
3
|
import { Stack, Typography, useTheme } from '@mui/material';
|
|
4
4
|
import { useLocaleState, useLocales, useRecordContext } from 'ra-core';
|
|
5
|
-
import TextField from './TextField';
|
|
5
|
+
import { TextField } from './TextField';
|
|
6
6
|
import { FlagOutlined, FlagFilled } from '@ant-design/icons';
|
|
7
7
|
import { useSx } from '../../hooks';
|
|
8
8
|
import { localizedValueHasAllLocales } from '../../utils';
|
|
9
9
|
import { ReactElement, useMemo } from 'react';
|
|
10
10
|
import { Tooltip } from '../@extended';
|
|
11
11
|
|
|
12
|
-
type ILocalizedTextFieldProps = TextFieldProps;
|
|
12
|
+
export type ILocalizedTextFieldProps = TextFieldProps;
|
|
13
13
|
|
|
14
|
-
function LocalizedTextField(props: ILocalizedTextFieldProps) {
|
|
14
|
+
export function LocalizedTextField(props: ILocalizedTextFieldProps): JSX.Element {
|
|
15
15
|
const theme = useTheme(),
|
|
16
16
|
locales = useLocales(),
|
|
17
17
|
{ source = '' } = props,
|
|
@@ -66,14 +66,14 @@ export type ReadonlyFieldProps = {
|
|
|
66
66
|
fullWidth?: boolean;
|
|
67
67
|
};
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
export function ReadonlyField({
|
|
70
70
|
label,
|
|
71
71
|
source,
|
|
72
72
|
defaultValue = ' ',
|
|
73
73
|
children = <BasicField source={''} defaultValue={undefined} record={undefined} />,
|
|
74
74
|
tooltip: _tooltip,
|
|
75
75
|
...props
|
|
76
|
-
}: ReadonlyFieldProps)
|
|
76
|
+
}: ReadonlyFieldProps): JSX.Element {
|
|
77
77
|
const { getCurrentDialog } = useAppConfig();
|
|
78
78
|
const record = useRecordContext(props);
|
|
79
79
|
const resource = useResourceContext(props as any);
|
|
@@ -107,5 +107,6 @@ const ReadonlyField = ({
|
|
|
107
107
|
</Fragment>
|
|
108
108
|
</ContentWrapper>
|
|
109
109
|
);
|
|
110
|
-
}
|
|
110
|
+
}
|
|
111
|
+
|
|
111
112
|
export default ReadonlyField;
|
|
@@ -1,39 +1,19 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
1
|
import { Pagination, ReferenceManyField as RaReferenceManyField, ReferenceManyFieldProps as RaReferenceManyFieldProps } from 'react-admin';
|
|
3
2
|
import { styled } from '@mui/system';
|
|
4
3
|
import React from 'react';
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
type StyledDivProps = {
|
|
7
6
|
children?: React.ReactNode;
|
|
8
7
|
className?: string;
|
|
9
8
|
};
|
|
10
|
-
|
|
11
|
-
export type ReferenceManyFieldProps = RaReferenceManyFieldProps & {
|
|
12
|
-
/**
|
|
13
|
-
* Default undefined, serve ad aggiungere un padding superiore al componente per consentire
|
|
14
|
-
* la visualizzazione della toolbar delle bulk action buttons.
|
|
15
|
-
*/
|
|
16
|
-
bulkActionButtons?: boolean | any;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export type StyledRootProps = ReferenceManyFieldProps & {
|
|
9
|
+
type StyledRootProps = ReferenceManyFieldProps & {
|
|
20
10
|
theme?: any;
|
|
21
11
|
bulkActionButtons?: boolean | any;
|
|
22
12
|
};
|
|
23
|
-
const StyledDiv = function ({ children, className }: StyledDivProps) {
|
|
13
|
+
const StyledDiv = function ({ children = null, className = '' }: StyledDivProps) {
|
|
24
14
|
return <div className={className}>{children}</div>;
|
|
25
15
|
};
|
|
26
16
|
|
|
27
|
-
StyledDiv.defaultProps = {
|
|
28
|
-
children: null,
|
|
29
|
-
className: ''
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
StyledDiv.propTypes = {
|
|
33
|
-
children: PropTypes.node,
|
|
34
|
-
className: PropTypes.string
|
|
35
|
-
};
|
|
36
|
-
|
|
37
17
|
const StyledRoot = styled(StyledDiv, {
|
|
38
18
|
name: 'RaApplicaReferenceManyField',
|
|
39
19
|
slot: 'root'
|
|
@@ -95,14 +75,21 @@ const StyledRoot = styled(StyledDiv, {
|
|
|
95
75
|
};
|
|
96
76
|
});
|
|
97
77
|
|
|
78
|
+
export type ReferenceManyFieldProps = RaReferenceManyFieldProps & {
|
|
79
|
+
/**
|
|
80
|
+
* Default undefined, serve ad aggiungere un padding superiore al componente per consentire
|
|
81
|
+
* la visualizzazione della toolbar delle bulk action buttons.
|
|
82
|
+
*/
|
|
83
|
+
bulkActionButtons?: boolean | any;
|
|
84
|
+
};
|
|
85
|
+
|
|
98
86
|
/**
|
|
99
|
-
*
|
|
100
|
-
*
|
|
87
|
+
* This component allows you to manage the display of a list of records related to a main record.
|
|
88
|
+
* This component is a customized version of the ReferenceManyField component of React-Admin.
|
|
101
89
|
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
* superiore del componente <Datagrid />).
|
|
90
|
+
* If you want to display records and not show the list of available actions (bulk action buttons)
|
|
91
|
+
* you can set the bulkActionButtons prop to false and, subsequently, if you use an internal component of type <Datagrid />
|
|
92
|
+
* you must set the same property, bulkActionButtons, to false (in this way the top padding of the <Datagrid /> component is completely removed).
|
|
106
93
|
*
|
|
107
94
|
* @example
|
|
108
95
|
* import { ReferenceManyField, Datagrid } from '@applica-software-guru/react-admin';
|
|
@@ -117,11 +104,13 @@ const StyledRoot = styled(StyledDiv, {
|
|
|
117
104
|
* @param props {ReferenceManyFieldProps}
|
|
118
105
|
* @returns {JSX.Element}
|
|
119
106
|
*/
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
{
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
107
|
+
export function ReferenceManyField(props: ReferenceManyFieldProps): JSX.Element {
|
|
108
|
+
return (
|
|
109
|
+
<StyledRoot {...props}>
|
|
110
|
+
{/** @ts-ignore */}
|
|
111
|
+
<RaReferenceManyField pagination={<Pagination />} {...props} />
|
|
112
|
+
</StyledRoot>
|
|
113
|
+
);
|
|
114
|
+
}
|
|
126
115
|
|
|
127
116
|
export default ReferenceManyField;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
1
|
import { Typography } from '@mui/material';
|
|
3
2
|
import { get } from 'lodash';
|
|
4
|
-
import { useRecordContext } from 'react-admin';
|
|
5
|
-
|
|
3
|
+
import { FieldProps, useRecordContext } from 'react-admin';
|
|
4
|
+
|
|
5
|
+
export type SizeFieldProps = {
|
|
6
|
+
source: string;
|
|
7
|
+
} & FieldProps;
|
|
8
|
+
|
|
9
|
+
export function SizeField({ source, ...props }: SizeFieldProps): JSX.Element {
|
|
6
10
|
const record = useRecordContext(props);
|
|
7
11
|
const size = get(record, source, 0);
|
|
8
12
|
const sizeInKb = size / 1024;
|
|
@@ -22,11 +26,6 @@ const SizeField = ({ source, ...props }) => {
|
|
|
22
26
|
{value}
|
|
23
27
|
</Typography>
|
|
24
28
|
);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
SizeField.propTypes = {
|
|
28
|
-
record: PropTypes.object,
|
|
29
|
-
source: PropTypes.string
|
|
30
|
-
};
|
|
29
|
+
}
|
|
31
30
|
|
|
32
31
|
export default SizeField;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TextField as RaTextField, TextFieldProps } from 'react-admin';
|
|
2
|
+
import { styled } from '@mui/material/styles';
|
|
3
|
+
|
|
4
|
+
const StyledTextField = styled(RaTextField, {
|
|
5
|
+
name: 'RaApplicaTextField',
|
|
6
|
+
slot: 'Root'
|
|
7
|
+
})(() => ({}));
|
|
8
|
+
|
|
9
|
+
export function TextField({ variant = 'body1', ...props }: TextFieldProps): JSX.Element {
|
|
10
|
+
// @ts-ignore
|
|
11
|
+
return <StyledTextField {...props} variant={variant} />;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default TextField;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from './ActionsField';
|
|
2
|
+
export * from './AttachmentField';
|
|
3
|
+
export * from './CoverField';
|
|
4
|
+
export * from './DateAgoField';
|
|
5
|
+
export * from './DateField';
|
|
6
|
+
export * from './EmailField';
|
|
7
|
+
export * from './FileField';
|
|
8
|
+
export * from './FunctionField';
|
|
9
|
+
export * from './ImageField';
|
|
10
|
+
export * from './LocalizedTextField';
|
|
11
|
+
export * from './ReadonlyField';
|
|
12
|
+
export * from './ReferenceManyField';
|
|
13
|
+
export * from './SizeField';
|
|
14
|
+
export * from './TextField';
|