@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,44 @@
|
|
|
1
|
+
import { CoverField } from '../ra-fields';
|
|
2
|
+
import { get } from 'lodash';
|
|
3
|
+
import { ImageInput as RaImageInput, ImageInputProps as RaImageInputProps, useInput, useRecordContext } from 'react-admin';
|
|
4
|
+
import { useWatch } from 'react-hook-form';
|
|
5
|
+
import LabeledInput from './LabeledInput';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
export type ImageInputProps = {
|
|
9
|
+
source: string;
|
|
10
|
+
title?: string;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
multiple?: boolean;
|
|
13
|
+
} & RaImageInputProps;
|
|
14
|
+
|
|
15
|
+
export function ImageInput({ children = <CoverField />, title, multiple = false, ...props }: ImageInputProps): JSX.Element {
|
|
16
|
+
const file = useWatch({ name: props.source });
|
|
17
|
+
const record = useRecordContext(props);
|
|
18
|
+
const { source } = props;
|
|
19
|
+
useInput({ source: `__image__${props?.source}`, defaultValue: props?.source });
|
|
20
|
+
return (
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
<LabeledInput {...props} multiple={multiple}>
|
|
23
|
+
{/* @ts-ignore */}
|
|
24
|
+
<RaImageInput accept="image/*">
|
|
25
|
+
{
|
|
26
|
+
/** @ts-ignore */
|
|
27
|
+
React.cloneElement(children, {
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
...children.props,
|
|
30
|
+
title,
|
|
31
|
+
source,
|
|
32
|
+
record: {
|
|
33
|
+
...record,
|
|
34
|
+
[source]: file?.title || get(record, source),
|
|
35
|
+
[`_${source}`]: file?.src || get(record, `_${source}`)
|
|
36
|
+
}
|
|
37
|
+
})
|
|
38
|
+
}
|
|
39
|
+
</RaImageInput>
|
|
40
|
+
</LabeledInput>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export default ImageInput;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { FormHelperText, InputLabel, Stack, SxProps } from '@mui/material';
|
|
2
|
-
|
|
3
1
|
import { FieldTitle } from 'react-admin';
|
|
4
|
-
import
|
|
5
|
-
import React from 'react';
|
|
2
|
+
import { FormHelperText, InputLabel, Stack, SxProps } from '@mui/material';
|
|
6
3
|
import { useAppConfig } from '../../hooks';
|
|
7
4
|
import { useFormContext } from 'react-hook-form';
|
|
8
5
|
import { useTheme } from '@emotion/react';
|
|
6
|
+
import React from 'react';
|
|
9
7
|
|
|
10
8
|
export type LabeledArrayInputProps = {
|
|
11
9
|
label?: string | boolean;
|
|
@@ -22,22 +20,19 @@ export type LabeledArrayInputProps = {
|
|
|
22
20
|
};
|
|
23
21
|
|
|
24
22
|
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* @param {LabeledArrayInputProps}
|
|
28
|
-
* @returns {React.ReactElement}
|
|
23
|
+
* Allows you to display an array of inputs with a label and a helper text with the Mantis theme style.
|
|
29
24
|
*/
|
|
30
|
-
|
|
25
|
+
export function LabeledArrayInput({
|
|
31
26
|
label,
|
|
32
27
|
children,
|
|
33
|
-
display,
|
|
28
|
+
display = 'label',
|
|
34
29
|
helperText,
|
|
35
30
|
sx,
|
|
36
31
|
addLabel,
|
|
37
|
-
divider,
|
|
32
|
+
divider = false,
|
|
38
33
|
fullWidth,
|
|
39
34
|
...props
|
|
40
|
-
}: LabeledArrayInputProps): React.ReactElement
|
|
35
|
+
}: LabeledArrayInputProps): React.ReactElement {
|
|
41
36
|
const theme = useTheme() as any;
|
|
42
37
|
const { getCurrentDialog } = useAppConfig();
|
|
43
38
|
const { source, resource, isRequired } = props;
|
|
@@ -97,24 +92,6 @@ const LabeledArrayInput = ({
|
|
|
97
92
|
)}
|
|
98
93
|
</Stack>
|
|
99
94
|
);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
LabeledArrayInput.propTypes = {
|
|
103
|
-
sx: PropTypes.object,
|
|
104
|
-
children: PropTypes.element,
|
|
105
|
-
label: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
|
|
106
|
-
addLabel: PropTypes.bool,
|
|
107
|
-
resource: PropTypes.string,
|
|
108
|
-
isRequired: PropTypes.bool,
|
|
109
|
-
source: PropTypes.string,
|
|
110
|
-
display: PropTypes.oneOf(['legend', 'label']),
|
|
111
|
-
helperText: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
|
|
112
|
-
divider: PropTypes.bool
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
LabeledArrayInput.defaultProps = {
|
|
116
|
-
display: 'label',
|
|
117
|
-
divider: false
|
|
118
|
-
};
|
|
95
|
+
}
|
|
119
96
|
|
|
120
97
|
export default LabeledArrayInput;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { FieldTitle, InputProps, useInput } from 'react-admin';
|
|
2
2
|
import { FormHelperText, InputLabel, Stack } from '@mui/material';
|
|
3
|
-
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
|
-
import React from 'react';
|
|
6
3
|
import { useAppConfig } from '../../hooks';
|
|
7
4
|
import { useTheme } from '@mui/material/styles';
|
|
5
|
+
import React from 'react';
|
|
8
6
|
|
|
9
7
|
export type LabeledInputProps = InputProps & {
|
|
10
8
|
sx?: any;
|
|
@@ -19,7 +17,16 @@ export type LabeledInputProps = InputProps & {
|
|
|
19
17
|
divider?: boolean;
|
|
20
18
|
};
|
|
21
19
|
|
|
22
|
-
|
|
20
|
+
export function LabeledInput({
|
|
21
|
+
label,
|
|
22
|
+
children,
|
|
23
|
+
display = 'label',
|
|
24
|
+
helperText,
|
|
25
|
+
sx,
|
|
26
|
+
addLabel,
|
|
27
|
+
divider = false,
|
|
28
|
+
...props
|
|
29
|
+
}: LabeledInputProps): JSX.Element {
|
|
23
30
|
const theme = useTheme();
|
|
24
31
|
const { getCurrentDialog } = useAppConfig();
|
|
25
32
|
const { source, resource, isRequired } = props;
|
|
@@ -82,24 +89,5 @@ const LabeledInput = ({ label, children, display, helperText, sx, addLabel, divi
|
|
|
82
89
|
)}
|
|
83
90
|
</Stack>
|
|
84
91
|
);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
LabeledInput.propTypes = {
|
|
88
|
-
sx: PropTypes.object,
|
|
89
|
-
children: PropTypes.element,
|
|
90
|
-
label: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
|
|
91
|
-
addLabel: PropTypes.bool,
|
|
92
|
-
resource: PropTypes.string,
|
|
93
|
-
isRequired: PropTypes.bool,
|
|
94
|
-
source: PropTypes.string,
|
|
95
|
-
display: PropTypes.oneOf(['legend', 'label']),
|
|
96
|
-
helperText: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
|
|
97
|
-
divider: PropTypes.bool
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
LabeledInput.defaultProps = {
|
|
101
|
-
display: 'label',
|
|
102
|
-
divider: false
|
|
103
|
-
};
|
|
104
|
-
|
|
92
|
+
}
|
|
105
93
|
export default LabeledInput;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import _ from 'lodash';
|
|
2
|
-
import { ReactElement, useCallback, useMemo, useState } from 'react';
|
|
3
2
|
import { Box, Chip, ListItemText, Menu, MenuItem, PopoverOrigin, Typography } from '@mui/material';
|
|
4
|
-
import { useInput, useLocaleState, useLocales } from 'ra-core';
|
|
5
|
-
import { TextInputProps } from 'ra-ui-materialui';
|
|
6
|
-
import TextInput from './TextInput';
|
|
7
3
|
import { localizedValueHasAllLocales } from '../../utils';
|
|
4
|
+
import { ReactElement, useCallback, useMemo, useState } from 'react';
|
|
5
|
+
import { TextInputProps } from 'ra-ui-materialui';
|
|
6
|
+
import { useInput, useLocaleState, useLocales } from 'ra-core';
|
|
8
7
|
import { useWatch } from 'react-hook-form';
|
|
9
8
|
import LabeledInput, { LabeledInputProps } from './LabeledInput';
|
|
10
|
-
|
|
11
|
-
type ILocalizedTextInputProps = TextInputProps & LabeledInputProps;
|
|
9
|
+
import TextInput from './TextInput';
|
|
12
10
|
|
|
13
11
|
const ANCHOR_ORIGIN: PopoverOrigin = { vertical: 'bottom', horizontal: 'right' },
|
|
14
12
|
TRANSFORM_ORIGIN: PopoverOrigin = { vertical: 'top', horizontal: 'right' };
|
|
15
13
|
|
|
16
|
-
|
|
14
|
+
export type ILocalizedTextInputProps = TextInputProps & LabeledInputProps;
|
|
15
|
+
|
|
16
|
+
export function LocalizedTextInput(props: ILocalizedTextInputProps) {
|
|
17
17
|
const { source } = props,
|
|
18
18
|
{ fieldState } = useInput(props),
|
|
19
19
|
value = useWatch({ name: source }),
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { NumberInputProps, NumberInput as RaNumberInput } from 'react-admin';
|
|
2
|
+
import { styled } from '@mui/material/styles';
|
|
3
|
+
import LabeledInput from './LabeledInput';
|
|
4
|
+
|
|
5
|
+
const StyledNumberInput = styled(RaNumberInput, {
|
|
6
|
+
name: 'RaApplicaNumberInput',
|
|
7
|
+
slot: 'root'
|
|
8
|
+
})(({ label }) => ({
|
|
9
|
+
'& legend': {
|
|
10
|
+
width: label === false ? 0 : 'auto'
|
|
11
|
+
}
|
|
12
|
+
}));
|
|
13
|
+
|
|
14
|
+
export function NumberInput(props: NumberInputProps): JSX.Element {
|
|
15
|
+
return (
|
|
16
|
+
// @ts-ignore
|
|
17
|
+
<LabeledInput {...props}>
|
|
18
|
+
{/** @ts-ignore */}
|
|
19
|
+
<StyledNumberInput />
|
|
20
|
+
</LabeledInput>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export default NumberInput;
|
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { get } from 'lodash';
|
|
2
|
+
import { TextField } from '@mui/material';
|
|
2
3
|
import { useDataProvider, useRecordContext, useResourceContext } from 'react-admin';
|
|
4
|
+
import React, { useCallback, useEffect, useState } from 'react';
|
|
3
5
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
export type RecordInputProps = {
|
|
7
|
+
source: string;
|
|
8
|
+
minWidth?: number;
|
|
9
|
+
children?: React.ReactElement;
|
|
10
|
+
};
|
|
7
11
|
|
|
8
|
-
|
|
12
|
+
export function RecordInput({ source, minWidth = 300, children }: RecordInputProps): JSX.Element {
|
|
9
13
|
const resource = useResourceContext();
|
|
10
14
|
const record = useRecordContext();
|
|
11
15
|
const [value, setValue] = useState(get(record, source, ''));
|
|
12
16
|
const [updating, setUpdating] = useState(false);
|
|
13
|
-
const handleChange = useCallback((evt) => setValue(evt.target.value), []);
|
|
17
|
+
const handleChange = useCallback((evt: any) => setValue(evt.target.value), []);
|
|
14
18
|
const dataProvider = useDataProvider();
|
|
15
19
|
|
|
16
20
|
const handleKeyPress = useCallback(
|
|
17
|
-
(evt) => {
|
|
21
|
+
(evt: any) => {
|
|
18
22
|
if (evt.key !== 'Enter') {
|
|
19
23
|
return;
|
|
20
24
|
}
|
|
@@ -26,7 +30,8 @@ const RecordInput = ({ source, minWidth = 300, children }) => {
|
|
|
26
30
|
...record,
|
|
27
31
|
[source]: value,
|
|
28
32
|
_changed: source
|
|
29
|
-
}
|
|
33
|
+
},
|
|
34
|
+
previousData: record
|
|
30
35
|
})
|
|
31
36
|
.then(() => setUpdating(false));
|
|
32
37
|
},
|
|
@@ -45,13 +50,14 @@ const RecordInput = ({ source, minWidth = 300, children }) => {
|
|
|
45
50
|
...record,
|
|
46
51
|
[source]: value,
|
|
47
52
|
_changed: source
|
|
48
|
-
}
|
|
53
|
+
},
|
|
54
|
+
previousData: record
|
|
49
55
|
})
|
|
50
56
|
.then(() => setUpdating(false));
|
|
51
57
|
}, [value, dataProvider, resource, source, record]);
|
|
52
58
|
|
|
53
59
|
const handleRemoteChange = useCallback(
|
|
54
|
-
(value) => {
|
|
60
|
+
(value: any) => {
|
|
55
61
|
setUpdating(true);
|
|
56
62
|
dataProvider
|
|
57
63
|
.update(resource, {
|
|
@@ -60,7 +66,8 @@ const RecordInput = ({ source, minWidth = 300, children }) => {
|
|
|
60
66
|
...record,
|
|
61
67
|
[source]: value,
|
|
62
68
|
_changed: source
|
|
63
|
-
}
|
|
69
|
+
},
|
|
70
|
+
previousData: record
|
|
64
71
|
})
|
|
65
72
|
.then(() => setUpdating(false));
|
|
66
73
|
},
|
|
@@ -87,16 +94,11 @@ const RecordInput = ({ source, minWidth = 300, children }) => {
|
|
|
87
94
|
onBlur={handleBlur}
|
|
88
95
|
style={{ minWidth, width: '100%' }}
|
|
89
96
|
multiline
|
|
97
|
+
// @ts-ignore
|
|
90
98
|
InputProps={{ 'arial-label': 'naked' }}
|
|
91
99
|
size="small"
|
|
92
100
|
/>
|
|
93
101
|
);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
RecordInput.propTypes = {
|
|
97
|
-
source: PropTypes.string.isRequired,
|
|
98
|
-
minWidth: PropTypes.number,
|
|
99
|
-
children: PropTypes.element
|
|
100
|
-
};
|
|
102
|
+
}
|
|
101
103
|
|
|
102
104
|
export default RecordInput;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReferenceArrayInput as RaReferenceArrayInput, ReferenceArrayInputProps as RaReferenceArrayInputProps } from 'react-admin';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
export type ReferenceArrayInputProps = {
|
|
5
|
+
children: React.ReactElement;
|
|
6
|
+
} & RaReferenceArrayInputProps;
|
|
7
|
+
|
|
8
|
+
export function ReferenceArrayInput({ children, ...props }: ReferenceArrayInputProps): JSX.Element {
|
|
9
|
+
return (
|
|
10
|
+
<RaReferenceArrayInput {...props}>
|
|
11
|
+
{React.cloneElement(children, {
|
|
12
|
+
...props,
|
|
13
|
+
source: children.props.source || props.source
|
|
14
|
+
})}
|
|
15
|
+
</RaReferenceArrayInput>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default ReferenceArrayInput;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReferenceInput as RaReferenceInput, ReferenceInputProps as RaReferenceInputProps } from 'react-admin';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
export type ReferenceInputProps = {
|
|
5
|
+
children: React.ReactElement;
|
|
6
|
+
} & RaReferenceInputProps;
|
|
7
|
+
|
|
8
|
+
export function ReferenceInput({ children, ...props }: ReferenceInputProps): JSX.Element {
|
|
9
|
+
return (
|
|
10
|
+
<RaReferenceInput {...props}>
|
|
11
|
+
{React.cloneElement(children, {
|
|
12
|
+
...props,
|
|
13
|
+
source: children.props.source || props.source
|
|
14
|
+
})}
|
|
15
|
+
</RaReferenceInput>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default ReferenceInput;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Fragment, ReactElement } from 'react';
|
|
2
|
+
import { ListToolbar, Pagination, ResourceContextProvider } from 'react-admin';
|
|
3
|
+
import { ReferenceManyField, ReferenceManyFieldProps } from '../ra-fields';
|
|
4
|
+
|
|
5
|
+
export type ReferenceManyInputProps = {
|
|
6
|
+
reference: string;
|
|
7
|
+
target: string;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
filters?: ReactElement;
|
|
10
|
+
actions?: ReactElement;
|
|
11
|
+
} & ReferenceManyFieldProps;
|
|
12
|
+
|
|
13
|
+
export function ReferenceManyInput({ reference, target, children, filters, actions, ...props }: ReferenceManyInputProps): JSX.Element {
|
|
14
|
+
return (
|
|
15
|
+
<ResourceContextProvider value={reference}>
|
|
16
|
+
<ReferenceManyField perPage={5} pagination={<Pagination />} {...props} reference={reference} target={target}>
|
|
17
|
+
<Fragment>
|
|
18
|
+
<ListToolbar filters={filters} actions={actions} />
|
|
19
|
+
{children}
|
|
20
|
+
</Fragment>
|
|
21
|
+
</ReferenceManyField>
|
|
22
|
+
</ResourceContextProvider>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export default ReferenceManyInput;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SearchInput as RaSearchInput, SearchInputProps } from 'react-admin';
|
|
2
|
+
import { styled } from '@mui/material/styles';
|
|
3
|
+
|
|
4
|
+
const StyledSearchInput = styled(RaSearchInput, {
|
|
5
|
+
name: 'RaApplicaSearchInput',
|
|
6
|
+
slot: 'root'
|
|
7
|
+
})(() => ({}));
|
|
8
|
+
|
|
9
|
+
export function SearchInput(props: SearchInputProps): JSX.Element {
|
|
10
|
+
return <StyledSearchInput {...props} />;
|
|
11
|
+
}
|
|
12
|
+
export default SearchInput;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { SelectArrayInput as RaSelectArrayInput, SelectArrayInputProps } from 'react-admin';
|
|
2
|
+
import { styled } from '@mui/material/styles';
|
|
3
|
+
import LabeledInput from './LabeledInput';
|
|
4
|
+
|
|
5
|
+
const StyledSelectArrayInput = styled(RaSelectArrayInput, {
|
|
6
|
+
name: 'RaApplicaSelectArrayInput',
|
|
7
|
+
slot: 'Root'
|
|
8
|
+
})(({ label }) => ({
|
|
9
|
+
'& legend': {
|
|
10
|
+
width: label === false ? 0 : 'auto'
|
|
11
|
+
},
|
|
12
|
+
'& .RaSelectArrayInput-chips > .RaSelectArrayInput-chip': {
|
|
13
|
+
marginTop: '-2px',
|
|
14
|
+
marginBottom: '-2px'
|
|
15
|
+
}
|
|
16
|
+
}));
|
|
17
|
+
|
|
18
|
+
export function SelectArrayInput({ optionText = 'name', optionValue = 'id', ...props }: SelectArrayInputProps): JSX.Element {
|
|
19
|
+
return (
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
<LabeledInput {...props}>
|
|
22
|
+
<StyledSelectArrayInput
|
|
23
|
+
optionText={optionText}
|
|
24
|
+
optionValue={optionValue}
|
|
25
|
+
options={{
|
|
26
|
+
autoWidth: false
|
|
27
|
+
}}
|
|
28
|
+
/>
|
|
29
|
+
</LabeledInput>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export default SelectArrayInput;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import LabeledInput, { LabeledInputProps } from './LabeledInput';
|
|
2
1
|
import { SelectInput as RaSelectInput, SelectInputProps as RaSelectInputProps } from 'react-admin';
|
|
3
|
-
|
|
4
2
|
import { styled } from '@mui/material/styles';
|
|
3
|
+
import LabeledInput, { LabeledInputProps } from './LabeledInput';
|
|
5
4
|
|
|
6
5
|
const ApplicaStyledSelectInput = styled(RaSelectInput, {
|
|
7
6
|
name: 'RaApplicaSelectArrayInput',
|
|
@@ -10,15 +9,14 @@ const ApplicaStyledSelectInput = styled(RaSelectInput, {
|
|
|
10
9
|
'& legend': {
|
|
11
10
|
width: label === false || label === null ? 0 : 'auto'
|
|
12
11
|
}
|
|
13
|
-
// '& label.MuiFormLabel-root[data-shrink="false"]': {
|
|
14
|
-
// marginTop: '2px'
|
|
15
|
-
// }
|
|
16
12
|
}));
|
|
17
13
|
export type SelectInputProps = LabeledInputProps & RaSelectInputProps;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
export function SelectInput(props: SelectInputProps): JSX.Element {
|
|
15
|
+
return (
|
|
16
|
+
<LabeledInput {...props}>
|
|
17
|
+
<ApplicaStyledSelectInput />
|
|
18
|
+
</LabeledInput>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
23
21
|
|
|
24
22
|
export default SelectInput;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { maxLength as maxLengthValidator, useTranslate } from 'react-admin';
|
|
2
|
-
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import TextInput from './TextInput';
|
|
1
|
+
import { TextInputProps, maxLength as maxLengthValidator, useTranslate } from 'react-admin';
|
|
5
2
|
import { useController } from 'react-hook-form';
|
|
3
|
+
import TextInput from './TextInput';
|
|
4
|
+
|
|
5
|
+
export type SmartTextInputProps = {
|
|
6
|
+
maxLength?: number;
|
|
7
|
+
} & TextInputProps;
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
export function SmartTextInput({ multiline = false, ...props }: SmartTextInputProps): JSX.Element {
|
|
8
10
|
const translate = useTranslate();
|
|
9
11
|
const validationFn = maxLengthValidator(props?.maxLength, 'app.input.max_length_error');
|
|
10
12
|
const value = useController({ name: props?.source })?.field?.value;
|
|
@@ -26,7 +28,7 @@ const SmartTextInput = ({ ...props }) => {
|
|
|
26
28
|
});
|
|
27
29
|
|
|
28
30
|
if (props?.maxLength) {
|
|
29
|
-
helperText = helperText && helperText.length > 0 ? `${usedCharsInfo} - ${translate(helperText)}` : usedCharsInfo;
|
|
31
|
+
helperText = helperText && (helperText as string).length > 0 ? `${usedCharsInfo} - ${translate(helperText as string)}` : usedCharsInfo;
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
return (
|
|
@@ -34,24 +36,12 @@ const SmartTextInput = ({ ...props }) => {
|
|
|
34
36
|
{...props}
|
|
35
37
|
validate={validate}
|
|
36
38
|
helperText={helperText}
|
|
39
|
+
multiline={multiline}
|
|
37
40
|
inputProps={{
|
|
38
41
|
maxLength: props?.maxLength
|
|
39
42
|
}}
|
|
40
43
|
/>
|
|
41
44
|
);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
SmartTextInput.displayName = 'SmartTextInput';
|
|
45
|
-
|
|
46
|
-
SmartTextInput.defaultProps = {
|
|
47
|
-
multiline: false
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
SmartTextInput.propTypes = {
|
|
51
|
-
...TextInput.propTypes,
|
|
52
|
-
maxLength: PropTypes.number,
|
|
53
|
-
multiline: PropTypes.bool,
|
|
54
|
-
rows: PropTypes.number
|
|
55
|
-
};
|
|
45
|
+
}
|
|
56
46
|
|
|
57
47
|
export default SmartTextInput;
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import { TextInput as RaTextInput, TextInputProps } from 'react-admin';
|
|
2
|
-
|
|
3
2
|
import LabeledInput from './LabeledInput';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
{
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
...LabeledInput.propTypes
|
|
15
|
-
};
|
|
4
|
+
export function TextInput(props: TextInputProps): JSX.Element {
|
|
5
|
+
return (
|
|
6
|
+
// @ts-ignore
|
|
7
|
+
<LabeledInput {...props}>
|
|
8
|
+
{/* @ts-ignore */}
|
|
9
|
+
<RaTextInput />
|
|
10
|
+
</LabeledInput>
|
|
11
|
+
);
|
|
12
|
+
}
|
|
16
13
|
|
|
17
14
|
export default TextInput;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { parseTime } from '../../utils';
|
|
2
|
+
import { styled } from '@mui/material/styles';
|
|
3
|
+
import { TimeInput as RaTimeInput, TimeInputProps } from 'react-admin';
|
|
4
|
+
import LabeledInput from './LabeledInput';
|
|
5
|
+
|
|
6
|
+
function defaultFormatter(v: string): string {
|
|
7
|
+
if (!v) {
|
|
8
|
+
return '';
|
|
9
|
+
}
|
|
10
|
+
const time = parseTime(v);
|
|
11
|
+
if (time) {
|
|
12
|
+
return time.format('HH:mm');
|
|
13
|
+
}
|
|
14
|
+
return '';
|
|
15
|
+
}
|
|
16
|
+
function defaultParser(v: string): string {
|
|
17
|
+
return v;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const StyledTimeInput = styled(RaTimeInput, {
|
|
21
|
+
name: 'RaApplicaTimeInput',
|
|
22
|
+
slot: 'root'
|
|
23
|
+
})(({ label }) => ({
|
|
24
|
+
'& legend': {
|
|
25
|
+
width: label === false ? 0 : 'auto'
|
|
26
|
+
}
|
|
27
|
+
}));
|
|
28
|
+
|
|
29
|
+
export function TimeInput({ parse = defaultParser, format = defaultFormatter, ...props }: TimeInputProps): JSX.Element {
|
|
30
|
+
return (
|
|
31
|
+
// @ts-ignore
|
|
32
|
+
<LabeledInput {...props}>
|
|
33
|
+
{/* @ts-ignore */}
|
|
34
|
+
<StyledTimeInput parse={parse} format={format} {...props} />
|
|
35
|
+
</LabeledInput>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export default TimeInput;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export * from './ArrayInput';
|
|
2
|
+
export * from './AttachmentInput';
|
|
3
|
+
export * from './AutocompleteArrayInput';
|
|
4
|
+
export * from './AutocompleteInput';
|
|
5
|
+
export * from './BooleanInput';
|
|
6
|
+
export * from './DateInput';
|
|
7
|
+
export * from './DateTimeInput';
|
|
8
|
+
export * from './FileInput';
|
|
9
|
+
export * from './ImageInput';
|
|
10
|
+
export * from './LabeledArrayInput';
|
|
11
|
+
export * from './LabeledInput';
|
|
12
|
+
export * from './LocalizedTextInput';
|
|
13
|
+
export * from './NumberInput';
|
|
14
|
+
export * from './RecordInput';
|
|
15
|
+
export * from './ReferenceArrayInput';
|
|
16
|
+
export * from './ReferenceInput';
|
|
17
|
+
export * from './ReferenceManyInput';
|
|
18
|
+
export * from './SearchInput';
|
|
19
|
+
export * from './SelectArrayInput';
|
|
20
|
+
export * from './SelectInput';
|
|
21
|
+
export * from './SmartTextInput';
|
|
22
|
+
export * from './TextInput';
|
|
23
|
+
export * from './TimeInput';
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { Children, ReactNode, cloneElement, isValidElement, useCallback } from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
2
|
import { styled, lighten } from '@mui/material/styles';
|
|
3
|
+
import { TopToolbar } from 'react-admin';
|
|
4
|
+
import { useTranslate, sanitizeListRestProps, useListContext, Identifier } from 'ra-core';
|
|
5
|
+
import CloseIcon from '@mui/icons-material/Close';
|
|
5
6
|
import clsx from 'clsx';
|
|
7
|
+
import IconButton from '@mui/material/IconButton';
|
|
6
8
|
import Toolbar from '@mui/material/Toolbar';
|
|
7
9
|
import Typography from '@mui/material/Typography';
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
import CloseIcon from '@mui/icons-material/Close';
|
|
11
|
-
import { useTranslate, sanitizeListRestProps, useListContext, Identifier } from 'ra-core';
|
|
12
|
-
import { TopToolbar } from 'react-admin';
|
|
13
|
-
|
|
14
|
-
const BulkActionsToolbar = (props: BulkActionsToolbarProps) => {
|
|
11
|
+
export function BulkActionsToolbar(props: BulkActionsToolbarProps): JSX.Element {
|
|
15
12
|
const { label = 'ra.action.bulk_actions', children, className, ...rest } = props;
|
|
16
13
|
const { filterValues, resource, selectedIds = [], onUnselectItems } = useListContext(props);
|
|
17
14
|
|
|
@@ -62,13 +59,7 @@ const BulkActionsToolbar = (props: BulkActionsToolbarProps) => {
|
|
|
62
59
|
</Toolbar>
|
|
63
60
|
</Root>
|
|
64
61
|
);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
BulkActionsToolbar.propTypes = {
|
|
68
|
-
children: PropTypes.node,
|
|
69
|
-
label: PropTypes.string
|
|
70
|
-
};
|
|
71
|
-
|
|
62
|
+
}
|
|
72
63
|
export interface BulkActionsToolbarProps {
|
|
73
64
|
children?: ReactNode;
|
|
74
65
|
label?: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { useListContext, Button } from 'react-admin';
|
|
4
1
|
import { Box, Fab, Fade, List, ListItem, Popover, Theme, useMediaQuery } from '@mui/material';
|
|
2
|
+
import { useListContext, Button } from 'react-admin';
|
|
3
|
+
import * as React from 'react';
|
|
5
4
|
import CloseIcon from '@mui/icons-material/Close';
|
|
5
|
+
|
|
6
6
|
const noSpaceOutside = {
|
|
7
7
|
p: 0,
|
|
8
8
|
m: 0
|
|
@@ -14,7 +14,7 @@ const moreSpaceInside = {
|
|
|
14
14
|
width: '100%'
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
export function BulkFloatingActionsToolbar(props: BulkFloatingActionsToolbarProps): JSX.Element {
|
|
18
18
|
const { children } = props;
|
|
19
19
|
const [anchorEl, setAnchorEl] = React.useState<HTMLButtonElement | null>(null);
|
|
20
20
|
|
|
@@ -87,11 +87,7 @@ const BulkFloatingActionsToolbar = (props: BulkFloatingActionsToolbarProps) => {
|
|
|
87
87
|
</Box>
|
|
88
88
|
</Fade>
|
|
89
89
|
);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
BulkFloatingActionsToolbar.propTypes = {
|
|
93
|
-
children: PropTypes.node
|
|
94
|
-
};
|
|
90
|
+
}
|
|
95
91
|
|
|
96
92
|
export interface BulkFloatingActionsToolbarProps {
|
|
97
93
|
children?: React.ReactNode | React.ReactNode[];
|