@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
|
@@ -9,17 +9,16 @@ import {
|
|
|
9
9
|
DatagridClasses,
|
|
10
10
|
DatagridRoot
|
|
11
11
|
} from 'react-admin';
|
|
12
|
-
|
|
13
|
-
import * as React from 'react';
|
|
14
12
|
import { cloneElement, createElement, isValidElement, useCallback, useRef, useEffect, FC, useMemo } from 'react';
|
|
15
|
-
import PropTypes from 'prop-types';
|
|
16
13
|
import { sanitizeListRestProps, useListContext, Identifier } from 'ra-core';
|
|
17
14
|
import { Table } from '@mui/material';
|
|
15
|
+
import * as React from 'react';
|
|
16
|
+
import BulkActionsToolbar from '../BulkActionsToolbar';
|
|
18
17
|
import clsx from 'clsx';
|
|
19
|
-
import union from 'lodash/union';
|
|
20
|
-
import difference from 'lodash/difference';
|
|
21
18
|
import DatagridContextProvider from './DatagridContextProvider';
|
|
22
|
-
import
|
|
19
|
+
import difference from 'lodash/difference';
|
|
20
|
+
import PropTypes from 'prop-types';
|
|
21
|
+
import union from 'lodash/union';
|
|
23
22
|
|
|
24
23
|
const defaultBulkActionButtons = <BulkDeleteButton />;
|
|
25
24
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { ReactElement, ReactNode } from 'react';
|
|
2
1
|
import DatagridContext, { DatagridContextValue } from './DatagridContext';
|
|
2
|
+
import React, { ReactElement, ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
const DatagridContextProvider = ({ children, value }: { children: ReactNode; value: DatagridContextValue }): ReactElement => (
|
|
5
5
|
<DatagridContext.Provider value={value}>{children}</DatagridContext.Provider>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Datagrid as RaDatagrid } from './Datagrid';
|
|
2
2
|
import { DatagridProps } from 'react-admin';
|
|
3
|
-
|
|
4
3
|
import { styled } from '@mui/material/styles';
|
|
5
4
|
|
|
6
5
|
const StyledDatagrid = styled(RaDatagrid, {
|
|
@@ -43,13 +42,10 @@ const StyledDatagrid = styled(RaDatagrid, {
|
|
|
43
42
|
* It is used by the List component.
|
|
44
43
|
* It is not meant to be used directly.
|
|
45
44
|
* Thsi version is designed by Applica for Mantis and expose few overrides on css styles based on this theme.
|
|
46
|
-
*
|
|
47
|
-
* @param {DatagridProps} props
|
|
48
|
-
* @returns {JSX.Element}
|
|
49
45
|
*/
|
|
50
|
-
|
|
46
|
+
export function Datagrid(props: DatagridProps): JSX.Element {
|
|
51
47
|
// @ts-ignore
|
|
52
48
|
return <StyledDatagrid {...props} />;
|
|
53
|
-
}
|
|
49
|
+
}
|
|
54
50
|
|
|
55
51
|
export default Datagrid;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
/* eslint-disable camelcase */
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
import { useGetResourceLabel, useResourceContext, useResourceDefinition, useTranslate } from 'ra-core';
|
|
5
|
-
|
|
6
2
|
import { Inbox } from '@mui/icons-material';
|
|
7
|
-
import PropTypes from 'prop-types';
|
|
8
|
-
import { Typography } from '@mui/material';
|
|
9
3
|
import { styled } from '@mui/material/styles';
|
|
4
|
+
import { Typography } from '@mui/material';
|
|
5
|
+
import { useGetResourceLabel, useResourceContext, useResourceDefinition, useTranslate } from 'ra-core';
|
|
6
|
+
import * as React from 'react';
|
|
10
7
|
|
|
11
8
|
export type EmptyProps = {
|
|
12
9
|
/**
|
|
@@ -37,11 +34,8 @@ const StyledToolbar = styled('div')(({ theme }) => ({
|
|
|
37
34
|
*
|
|
38
35
|
* @example
|
|
39
36
|
* <List empty={<Empty actions={<Button label="Add" onClick={add} />} />} />
|
|
40
|
-
*
|
|
41
|
-
* @param {EmptyProps}
|
|
42
|
-
* @returns {JSX.Element}
|
|
43
37
|
*/
|
|
44
|
-
|
|
38
|
+
export function Empty({ actions, className, ...props }: EmptyProps): JSX.Element {
|
|
45
39
|
const { hasCreate } = useResourceDefinition(props);
|
|
46
40
|
const resource = useResourceContext(props);
|
|
47
41
|
|
|
@@ -77,7 +71,7 @@ const Empty = ({ actions, className, ...props }: EmptyProps): JSX.Element => {
|
|
|
77
71
|
<StyledToolbar className={EmptyClasses.toolbar}>{actions}</StyledToolbar>
|
|
78
72
|
</Root>
|
|
79
73
|
);
|
|
80
|
-
}
|
|
74
|
+
}
|
|
81
75
|
|
|
82
76
|
const PREFIX = 'ApplicaEmpty';
|
|
83
77
|
|
|
@@ -110,9 +104,4 @@ const Root = styled('span', {
|
|
|
110
104
|
}
|
|
111
105
|
}));
|
|
112
106
|
|
|
113
|
-
Empty.propTypes = {
|
|
114
|
-
actions: PropTypes.element,
|
|
115
|
-
className: PropTypes.string
|
|
116
|
-
};
|
|
117
|
-
|
|
118
107
|
export default Empty;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { TitlePropType, ListProps } from 'react-admin';
|
|
2
|
-
import MainCard from '../MainCard';
|
|
3
|
-
import { styled } from '@mui/system';
|
|
4
|
-
import { ReactElement } from 'react';
|
|
5
|
-
import PropTypes from 'prop-types';
|
|
6
1
|
import { ListBase, RaRecord } from 'ra-core';
|
|
2
|
+
import { ListProps } from 'react-admin';
|
|
7
3
|
import { ListView } from './ListView';
|
|
4
|
+
import { ReactElement } from 'react';
|
|
5
|
+
import { styled } from '@mui/system';
|
|
6
|
+
import MainCard from '../MainCard';
|
|
8
7
|
|
|
9
8
|
/**
|
|
10
9
|
* List page component
|
|
@@ -87,49 +86,18 @@ const RaList = <RecordType extends RaRecord = any>({
|
|
|
87
86
|
</ListBase>
|
|
88
87
|
);
|
|
89
88
|
|
|
90
|
-
// export interface ListProps<RecordType extends RaRecord = any> extends ListControllerProps<RecordType>, ListViewProps {}
|
|
91
|
-
|
|
92
|
-
RaList.propTypes = {
|
|
93
|
-
// the props you can change
|
|
94
|
-
// @ts-ignore-line
|
|
95
|
-
actions: PropTypes.oneOfType([PropTypes.bool, PropTypes.element]),
|
|
96
|
-
aside: PropTypes.element,
|
|
97
|
-
children: PropTypes.node.isRequired,
|
|
98
|
-
className: PropTypes.string,
|
|
99
|
-
emptyWhileLoading: PropTypes.bool,
|
|
100
|
-
filter: PropTypes.object,
|
|
101
|
-
filterDefaultValues: PropTypes.object,
|
|
102
|
-
filters: PropTypes.oneOfType([PropTypes.element, PropTypes.arrayOf(PropTypes.element)]),
|
|
103
|
-
// @ts-ignore-line
|
|
104
|
-
pagination: PropTypes.oneOfType([PropTypes.element, PropTypes.bool]),
|
|
105
|
-
perPage: PropTypes.number,
|
|
106
|
-
//@ts-ignore-line
|
|
107
|
-
sort: PropTypes.shape({
|
|
108
|
-
field: PropTypes.string,
|
|
109
|
-
order: PropTypes.oneOf(['ASC', 'DESC'] as const)
|
|
110
|
-
}),
|
|
111
|
-
sx: PropTypes.any,
|
|
112
|
-
title: TitlePropType,
|
|
113
|
-
// the props managed by react-admin
|
|
114
|
-
disableSyncWithLocation: PropTypes.bool,
|
|
115
|
-
hasCreate: PropTypes.bool,
|
|
116
|
-
resource: PropTypes.string
|
|
117
|
-
};
|
|
118
|
-
|
|
119
89
|
const defaultFilter = {};
|
|
120
90
|
|
|
121
|
-
const
|
|
91
|
+
const StyledList = styled(RaList, {
|
|
122
92
|
name: 'RaApplicaList',
|
|
123
93
|
slot: 'root'
|
|
124
94
|
})(({ theme }) => ({
|
|
125
95
|
'& .RaList-main': {
|
|
126
96
|
overflowX: 'auto',
|
|
127
|
-
|
|
128
97
|
'& .RaBulkActionsToolbar-toolbar': {
|
|
129
|
-
//
|
|
130
|
-
//
|
|
131
|
-
//
|
|
132
|
-
// su tabelle con scorrimento orizontale (sopratutto su mobile).
|
|
98
|
+
// The react-admin bulk actions toolbar is not perfectly compatible with the
|
|
99
|
+
// mantis theme, so I had to make a series of corrections to align it correctly
|
|
100
|
+
// and allow its use even on tables with horizontal scrolling (especially on mobile).
|
|
133
101
|
height: 36,
|
|
134
102
|
top: 42,
|
|
135
103
|
paddingTop: 16,
|
|
@@ -218,16 +186,12 @@ const ApplicaStyledList = styled(RaList, {
|
|
|
218
186
|
}
|
|
219
187
|
}));
|
|
220
188
|
|
|
221
|
-
|
|
189
|
+
export function List(props: ListProps): ReactElement {
|
|
222
190
|
return (
|
|
223
191
|
<MainCard content={false}>
|
|
224
|
-
<
|
|
192
|
+
<StyledList {...props} />
|
|
225
193
|
</MainCard>
|
|
226
194
|
);
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
List.propTypes = {
|
|
230
|
-
...RaList.propTypes
|
|
231
|
-
};
|
|
195
|
+
}
|
|
232
196
|
|
|
233
197
|
export default List;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { styled } from '@mui/material/styles';
|
|
3
1
|
import { cloneElement, ReactElement, ReactNode, ElementType } from 'react';
|
|
4
|
-
import {
|
|
5
|
-
import PropTypes from 'prop-types';
|
|
2
|
+
import { styled } from '@mui/material/styles';
|
|
6
3
|
import { SxProps } from '@mui/system';
|
|
4
|
+
import { Title, Pagination as DefaultPagination, ListToolbar, ListActions as DefaultActions, Empty } from 'react-admin';
|
|
5
|
+
import { useListContext, RaRecord } from 'ra-core';
|
|
6
|
+
import * as React from 'react';
|
|
7
7
|
import Card from '@mui/material/Card';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
|
-
import { ComponentPropType, useListContext, RaRecord } from 'ra-core';
|
|
10
|
-
|
|
11
9
|
import Error from '../Layout/Error';
|
|
12
10
|
|
|
13
11
|
const defaultActions = <DefaultActions />;
|
|
@@ -76,19 +74,6 @@ export const ListView = <RecordType extends RaRecord = any>(props: ListViewProps
|
|
|
76
74
|
);
|
|
77
75
|
};
|
|
78
76
|
|
|
79
|
-
ListView.propTypes = {
|
|
80
|
-
actions: PropTypes.oneOfType([PropTypes.bool, PropTypes.element]),
|
|
81
|
-
aside: PropTypes.element,
|
|
82
|
-
children: PropTypes.node,
|
|
83
|
-
className: PropTypes.string,
|
|
84
|
-
component: ComponentPropType,
|
|
85
|
-
emptyWhileLoading: PropTypes.bool,
|
|
86
|
-
filters: PropTypes.oneOfType([PropTypes.element, PropTypes.arrayOf(PropTypes.element)]),
|
|
87
|
-
hasCreate: PropTypes.bool,
|
|
88
|
-
pagination: PropTypes.oneOfType([PropTypes.element, PropTypes.bool]),
|
|
89
|
-
title: TitlePropType
|
|
90
|
-
};
|
|
91
|
-
|
|
92
77
|
export interface ListViewProps {
|
|
93
78
|
/**
|
|
94
79
|
* The actions to display in the toolbar. defaults to Filter + Create + Export.
|
package/src/components/ra-lists/NotificationList/{NotificationList.jsx → NotificationList.tsx}
RENAMED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { MarkAsReadedButton, MarkAsUnreadedButton } from './button';
|
|
2
|
-
import { useMemo } from 'react';
|
|
3
1
|
import { darken, lighten, useTheme } from '@mui/material';
|
|
4
|
-
|
|
5
|
-
import ActionsMenu from '../../ActionsMenu';
|
|
6
2
|
import { Datagrid } from 'react-admin';
|
|
7
3
|
import { DateAgoField } from '../../ra-fields';
|
|
8
|
-
import {
|
|
4
|
+
import { MarkAsReadedButton, MarkAsUnreadedButton } from './buttons';
|
|
5
|
+
import { NotificationField } from './fields';
|
|
6
|
+
import { useMemo } from 'react';
|
|
7
|
+
import ActionsMenu from '../../ActionsMenu';
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
export function NotificationList({ ...props }): JSX.Element {
|
|
11
10
|
const theme = useTheme();
|
|
12
11
|
const { mode, colorize, density } = useMemo(
|
|
13
12
|
() => ({
|
|
@@ -17,7 +16,7 @@ const NotificationList = ({ ...props }) => {
|
|
|
17
16
|
}),
|
|
18
17
|
[theme.palette.mode]
|
|
19
18
|
);
|
|
20
|
-
const rowSx = (record) => ({
|
|
19
|
+
const rowSx = (record: any) => ({
|
|
21
20
|
backgroundColor: !record?.readed ? colorize(theme.palette.primary[mode], density) : colorize(theme.palette.secondary[mode], density)
|
|
22
21
|
});
|
|
23
22
|
|
|
@@ -31,6 +30,6 @@ const NotificationList = ({ ...props }) => {
|
|
|
31
30
|
</ActionsMenu>
|
|
32
31
|
</Datagrid>
|
|
33
32
|
);
|
|
34
|
-
}
|
|
33
|
+
}
|
|
35
34
|
|
|
36
35
|
export default NotificationList;
|
|
@@ -8,16 +8,15 @@ import {
|
|
|
8
8
|
useUnselectAll,
|
|
9
9
|
useUpdateMany
|
|
10
10
|
} from 'react-admin';
|
|
11
|
-
|
|
12
11
|
import { Email } from '@mui/icons-material';
|
|
13
|
-
import dayjs from 'dayjs';
|
|
14
12
|
import { useCallback } from 'react';
|
|
13
|
+
import dayjs from 'dayjs';
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
export function MarkAsReadedButton(): JSX.Element {
|
|
17
16
|
const refresh = useRefresh();
|
|
18
17
|
const notify = useNotify();
|
|
19
|
-
const
|
|
20
|
-
const
|
|
18
|
+
const resource = useResourceContext() as string;
|
|
19
|
+
const unselectAll = useUnselectAll(resource);
|
|
21
20
|
const { selectedIds, data: tableRows } = useListContext();
|
|
22
21
|
const record = useRecordContext();
|
|
23
22
|
const rows = selectedIds.map((id) => tableRows.find((d) => d.id === id));
|
|
@@ -26,17 +25,18 @@ const MarkAsReadedButton = () => {
|
|
|
26
25
|
{
|
|
27
26
|
ids: selectedIds.length > 0 ? selectedIds : [record?.id],
|
|
28
27
|
data: { readed: dayjs().format('YYYY-MM-DD HH:mm:ss') },
|
|
28
|
+
// @ts-ignore
|
|
29
29
|
rows
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
onSuccess: () => {
|
|
33
33
|
refresh();
|
|
34
34
|
notify('resources.notifications.messages.readed.done');
|
|
35
|
-
unselectAll(
|
|
35
|
+
unselectAll();
|
|
36
36
|
},
|
|
37
|
-
onError: () => notify('ra.notification.readed_error', 'warning'),
|
|
37
|
+
onError: () => notify('ra.notification.readed_error', { type: 'warning' }),
|
|
38
38
|
|
|
39
|
-
onFailure: () => notify('ra.notification.readed_error', 'warning')
|
|
39
|
+
onFailure: () => notify('ra.notification.readed_error', { type: 'warning' })
|
|
40
40
|
}
|
|
41
41
|
);
|
|
42
42
|
const handleUpdateMany = useCallback(() => {
|
|
@@ -48,6 +48,6 @@ const MarkAsReadedButton = () => {
|
|
|
48
48
|
<Email />
|
|
49
49
|
</Button>
|
|
50
50
|
);
|
|
51
|
-
}
|
|
51
|
+
}
|
|
52
52
|
|
|
53
53
|
export default MarkAsReadedButton;
|
|
@@ -12,28 +12,29 @@ import {
|
|
|
12
12
|
import { Drafts } from '@mui/icons-material';
|
|
13
13
|
import { useCallback } from 'react';
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
export function MarkAsUnreadedButton(): JSX.Element {
|
|
16
16
|
const refresh = useRefresh();
|
|
17
17
|
const notify = useNotify();
|
|
18
|
-
const
|
|
18
|
+
const resource = useResourceContext();
|
|
19
|
+
const unselectAll = useUnselectAll(resource);
|
|
19
20
|
const { selectedIds, data: tableRows } = useListContext();
|
|
20
21
|
const record = useRecordContext();
|
|
21
|
-
const resource = useResourceContext();
|
|
22
22
|
const rows = selectedIds.map((id) => tableRows.find((d) => d.id === id)).concat([record]);
|
|
23
23
|
const [updateMany, { isLoading }] = useUpdateMany(
|
|
24
24
|
resource,
|
|
25
25
|
{
|
|
26
26
|
ids: selectedIds.length > 0 ? selectedIds : [record?.id],
|
|
27
27
|
data: { readed: null },
|
|
28
|
+
// @ts-ignore
|
|
28
29
|
rows
|
|
29
30
|
},
|
|
30
31
|
{
|
|
31
32
|
onSuccess: () => {
|
|
32
33
|
refresh();
|
|
33
34
|
notify('resources.notifications.messages.unreaded.done');
|
|
34
|
-
unselectAll(
|
|
35
|
+
unselectAll();
|
|
35
36
|
},
|
|
36
|
-
onFailure: () => notify('resources.notifications.messages.unreaded.error', 'warning')
|
|
37
|
+
onFailure: () => notify('resources.notifications.messages.unreaded.error', { type: 'warning' })
|
|
37
38
|
}
|
|
38
39
|
);
|
|
39
40
|
|
|
@@ -51,6 +52,6 @@ const MarkAsUnreadedButton = () => {
|
|
|
51
52
|
<Drafts />
|
|
52
53
|
</Button>
|
|
53
54
|
);
|
|
54
|
-
}
|
|
55
|
+
}
|
|
55
56
|
|
|
56
57
|
export default MarkAsUnreadedButton;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Box, Typography } from '@mui/material';
|
|
2
|
-
import
|
|
2
|
+
import { useCallback, useMemo } from 'react';
|
|
3
3
|
import { useLocaleState, useNotify, useRecordContext, useRedirect, useResourceContext, useTranslate, useUpdate } from 'react-admin';
|
|
4
4
|
|
|
5
5
|
import dayjs from 'dayjs';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
export function NotificationField(props: any): JSX.Element {
|
|
8
8
|
const record = useRecordContext(props);
|
|
9
9
|
const resource = useResourceContext(props);
|
|
10
10
|
const redirect = useRedirect();
|
|
@@ -35,8 +35,8 @@ const NotificationField = (props) => {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
|
-
|
|
39
|
-
notify('ra.notification.readed_error', 'warning');
|
|
38
|
+
onError: () => {
|
|
39
|
+
notify('ra.notification.readed_error', { type: 'warning' });
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
);
|
|
@@ -65,5 +65,5 @@ const NotificationField = (props) => {
|
|
|
65
65
|
)}
|
|
66
66
|
</div>
|
|
67
67
|
);
|
|
68
|
-
}
|
|
68
|
+
}
|
|
69
69
|
export default NotificationField;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './NotificationField';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './NotificationList'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SimpleList as RaSimpleList } from 'react-admin';
|
|
2
2
|
import { styled } from '@mui/material/styles';
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
export const SimpleList = styled(RaSimpleList, {
|
|
5
5
|
name: 'ApplicaSimpleList',
|
|
6
6
|
slot: 'root'
|
|
7
7
|
})(({ theme }) => ({
|
|
@@ -10,4 +10,4 @@ const StyledSimpleList = styled(RaSimpleList, {
|
|
|
10
10
|
paddingBottom: 0
|
|
11
11
|
}));
|
|
12
12
|
|
|
13
|
-
export default
|
|
13
|
+
export default SimpleList;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
1
|
+
export * from './BulkActionsToolbar';
|
|
2
|
+
export * from './BulkFloatingActionsToolbar';
|
|
3
|
+
export * from './Datagrid';
|
|
4
|
+
export * from './Empty';
|
|
5
|
+
export * from './List';
|
|
6
|
+
export * from './NotificationList';
|
|
7
|
+
export * from './SimpleList';
|
|
@@ -5,7 +5,6 @@ import { Link as RouterLink, useNavigate } from 'react-router-dom';
|
|
|
5
5
|
import AuthBackground from '../AuthBackground';
|
|
6
6
|
import AuthWrapper from '../AuthWrapper';
|
|
7
7
|
import { BaseAuthProps } from './types';
|
|
8
|
-
import PropTypes from 'prop-types';
|
|
9
8
|
import { TextInput } from '../ra-inputs';
|
|
10
9
|
import { useEffect } from 'react';
|
|
11
10
|
|
|
@@ -42,7 +41,16 @@ export type LoginPageProps = BaseAuthProps & {
|
|
|
42
41
|
*/
|
|
43
42
|
redirectTo: string;
|
|
44
43
|
};
|
|
45
|
-
|
|
44
|
+
export function LoginPage({
|
|
45
|
+
version,
|
|
46
|
+
name,
|
|
47
|
+
copy,
|
|
48
|
+
logo,
|
|
49
|
+
enablePasswordRecover = false,
|
|
50
|
+
enableRegistration = false,
|
|
51
|
+
redirectTo,
|
|
52
|
+
background = <AuthBackground />
|
|
53
|
+
}: LoginPageProps): JSX.Element {
|
|
46
54
|
const [loading, setLoading] = useSafeSetState(false);
|
|
47
55
|
const login = useLogin();
|
|
48
56
|
const translate = useTranslate();
|
|
@@ -135,19 +143,6 @@ const LoginPage = ({ version, name, copy, logo, enablePasswordRecover, enableReg
|
|
|
135
143
|
</Grid>
|
|
136
144
|
</AuthWrapper>
|
|
137
145
|
);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
LoginPage.propTypes = {
|
|
141
|
-
version: PropTypes.string.isRequired,
|
|
142
|
-
name: PropTypes.string.isRequired,
|
|
143
|
-
enablePasswordRecover: PropTypes.bool,
|
|
144
|
-
enableRegister: PropTypes.bool,
|
|
145
|
-
background: PropTypes.element
|
|
146
|
-
};
|
|
147
|
-
LoginPage.defaultProps = {
|
|
148
|
-
enablePasswordRecover: false,
|
|
149
|
-
enableRegister: false,
|
|
150
|
-
background: <AuthBackground />
|
|
151
|
-
};
|
|
146
|
+
}
|
|
152
147
|
|
|
153
148
|
export default LoginPage;
|
package/vite.config.js
CHANGED
|
@@ -5,81 +5,94 @@ import { defineConfig } from 'vite';
|
|
|
5
5
|
import dts from 'vite-plugin-dts';
|
|
6
6
|
import react from '@vitejs/plugin-react';
|
|
7
7
|
import { resolve } from 'node:path';
|
|
8
|
+
import process from 'process';
|
|
8
9
|
|
|
9
10
|
const { EsLinter, linterPlugin } = EsLint;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
include: ['./src/**/*.{js,jsx,ts,tsx}']
|
|
20
|
-
}),
|
|
21
|
-
react(),
|
|
22
|
-
linterPlugin({
|
|
23
|
-
include: ['./src/**/*.{js,jsx,ts,tsx}'],
|
|
24
|
-
linters: [new EsLinter({ configEnv })]
|
|
25
|
-
})
|
|
26
|
-
],
|
|
27
|
-
optimizeDeps: {
|
|
28
|
-
include: ['react', 'react-dom', 'react-admin', 'ra-ui-materialui', 'ra-core', 'ra-i18n-polyglot']
|
|
29
|
-
},
|
|
30
|
-
build: {
|
|
31
|
-
sourcemap: true,
|
|
32
|
-
lib: {
|
|
33
|
-
entry: resolve('src', 'index.jsx'),
|
|
34
|
-
name: 'react-admin',
|
|
35
|
-
formats: ['es', 'umd', 'cjs'],
|
|
36
|
-
fileName: (format) => `react-admin.${format}.js`
|
|
11
|
+
|
|
12
|
+
export default defineConfig((configEnv) => {
|
|
13
|
+
const isWatching = process.argv.includes('--watch');
|
|
14
|
+
return {
|
|
15
|
+
resolve: {
|
|
16
|
+
alias: {
|
|
17
|
+
// eslint-disable-next-line no-undef
|
|
18
|
+
'@applica-software-guru/react-admin': resolve(__dirname, 'src')
|
|
19
|
+
}
|
|
37
20
|
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
21
|
+
plugins: isWatching
|
|
22
|
+
? [
|
|
23
|
+
react(),
|
|
24
|
+
linterPlugin({
|
|
25
|
+
include: ['./src/**/*.{js,jsx,ts,tsx}'],
|
|
26
|
+
linters: [new EsLinter({ configEnv })]
|
|
27
|
+
})
|
|
28
|
+
]
|
|
29
|
+
: [
|
|
30
|
+
dts({
|
|
31
|
+
include: ['./src/**/*.{js,jsx,ts,tsx}']
|
|
32
|
+
}),
|
|
33
|
+
react(),
|
|
34
|
+
linterPlugin({
|
|
35
|
+
include: ['./src/**/*.{js,jsx,ts,tsx}'],
|
|
36
|
+
linters: [new EsLinter({ configEnv })]
|
|
37
|
+
})
|
|
38
|
+
],
|
|
39
|
+
optimizeDeps: {
|
|
40
|
+
include: ['react', 'react-dom', 'react-admin', 'ra-ui-materialui', 'ra-core', 'ra-i18n-polyglot']
|
|
41
|
+
},
|
|
42
|
+
build: {
|
|
43
|
+
sourcemap: true,
|
|
44
|
+
lib: {
|
|
45
|
+
entry: resolve('src', 'index.jsx'),
|
|
46
|
+
name: 'react-admin',
|
|
47
|
+
formats: ['es', 'umd', 'cjs'],
|
|
48
|
+
fileName: (format) => `react-admin.${format}.js`
|
|
44
49
|
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
'
|
|
64
|
-
'
|
|
65
|
-
'
|
|
66
|
-
'
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
50
|
+
rollupOptions: {
|
|
51
|
+
onwarn(warning, warn) {
|
|
52
|
+
if (warning.code === 'MODULE_LEVEL_DIRECTIVE' && warning.message.includes(`'use client'`)) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
warn(warning);
|
|
56
|
+
},
|
|
57
|
+
external: Object.keys(packageJson.peerDependencies || {}).concat([
|
|
58
|
+
'@ant-design/icons',
|
|
59
|
+
'@emotion/react',
|
|
60
|
+
'@emotion/styled',
|
|
61
|
+
'@mui/icons-material',
|
|
62
|
+
'@mui/material',
|
|
63
|
+
'ra-core',
|
|
64
|
+
'ra-i18n-polyglot',
|
|
65
|
+
'react-admin',
|
|
66
|
+
'react-hook-form',
|
|
67
|
+
'react-query',
|
|
68
|
+
'react-router-dom',
|
|
69
|
+
'react-router',
|
|
70
|
+
'react/jsx-runtime',
|
|
71
|
+
'react-refresh'
|
|
72
|
+
]),
|
|
73
|
+
output: {
|
|
74
|
+
globals: {
|
|
75
|
+
'@ant-design/icons': '@ant-design/icons',
|
|
76
|
+
'@emotion/react': '@emotion/react',
|
|
77
|
+
'@emotion/styled': '@emotion/styled',
|
|
78
|
+
'@mui/icons-material': '@mui/icons-material',
|
|
79
|
+
'@mui/material': '@mui/material',
|
|
80
|
+
'@mui/base': '@mui/base',
|
|
81
|
+
'ra-core': 'ra-core',
|
|
82
|
+
'ra-i18n-polyglot': 'ra-i18n-polyglot',
|
|
83
|
+
'ra-ui-materialui': 'ra-ui-materialui',
|
|
84
|
+
'react-admin': 'react-admin',
|
|
85
|
+
'react-dom': 'ReactDOM',
|
|
86
|
+
'react-hook-form': 'react-hook-form',
|
|
87
|
+
'react-query': 'react-query',
|
|
88
|
+
'react-router-dom': 'react-router-dom',
|
|
89
|
+
'react-router': 'react-router',
|
|
90
|
+
'react/jsx-runtime': 'react/jsx-runtime',
|
|
91
|
+
'react-refresh': 'react-refresh',
|
|
92
|
+
react: 'React'
|
|
93
|
+
}
|
|
81
94
|
}
|
|
82
95
|
}
|
|
83
96
|
}
|
|
84
|
-
}
|
|
85
|
-
})
|
|
97
|
+
};
|
|
98
|
+
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MarkAsReadedButton.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ra-lists/NotificationList/button/MarkAsReadedButton.jsx"],"names":[],"mappings":";AAeA,+EAmCC"}
|