@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.
Files changed (338) hide show
  1. package/dist/Admin.d.ts +5 -8
  2. package/dist/Admin.d.ts.map +1 -1
  3. package/dist/AdminContext.d.ts +2 -4
  4. package/dist/AdminContext.d.ts.map +1 -1
  5. package/dist/ApplicaAdmin.d.ts +4 -24
  6. package/dist/ApplicaAdmin.d.ts.map +1 -1
  7. package/dist/components/@extended/Breadcrumbs.d.ts +2 -8
  8. package/dist/components/AuthBackground.d.ts +2 -1
  9. package/dist/components/AuthBackground.d.ts.map +1 -1
  10. package/dist/components/Layout/Drawer/Drawer.d.ts +2 -2
  11. package/dist/components/Layout/Drawer/Drawer.d.ts.map +1 -1
  12. package/dist/components/Layout/Drawer/DrawerHeader.d.ts +2 -2
  13. package/dist/components/Layout/Drawer/DrawerHeader.d.ts.map +1 -1
  14. package/dist/components/Layout/Drawer/DrawerHeaderStyled.d.ts +1 -0
  15. package/dist/components/Layout/Drawer/DrawerHeaderStyled.d.ts.map +1 -1
  16. package/dist/components/Layout/Footer.d.ts +0 -11
  17. package/dist/components/Layout/Footer.d.ts.map +1 -1
  18. package/dist/components/Layout/Header/AppBarStyled.d.ts +7 -3
  19. package/dist/components/Layout/Header/AppBarStyled.d.ts.map +1 -1
  20. package/dist/components/Layout/Layout.d.ts.map +1 -1
  21. package/dist/components/Notification.d.ts +3 -6
  22. package/dist/components/Notification.d.ts.map +1 -1
  23. package/dist/components/index.d.ts +1 -0
  24. package/dist/components/index.d.ts.map +1 -1
  25. package/dist/components/ra-buttons/CreateInDialogButton.d.ts +3 -33
  26. package/dist/components/ra-buttons/CreateInDialogButton.d.ts.map +1 -1
  27. package/dist/components/ra-buttons/EditInDialogButton.d.ts +9 -22
  28. package/dist/components/ra-buttons/EditInDialogButton.d.ts.map +1 -1
  29. package/dist/components/ra-buttons/ImpersonateUserButton.d.ts +5 -10
  30. package/dist/components/ra-buttons/ImpersonateUserButton.d.ts.map +1 -1
  31. package/dist/components/ra-buttons/index.d.ts +3 -4
  32. package/dist/components/ra-buttons/index.d.ts.map +1 -1
  33. package/dist/components/ra-custom/ListItem.d.ts +1 -20
  34. package/dist/components/ra-custom/ListItem.d.ts.map +1 -1
  35. package/dist/components/ra-custom/index.d.ts +1 -2
  36. package/dist/components/ra-custom/index.d.ts.map +1 -1
  37. package/dist/components/ra-fields/ActionsField.d.ts +7 -21
  38. package/dist/components/ra-fields/ActionsField.d.ts.map +1 -1
  39. package/dist/components/ra-fields/AttachmentField.d.ts +2 -25
  40. package/dist/components/ra-fields/AttachmentField.d.ts.map +1 -1
  41. package/dist/components/ra-fields/BaseAttachmentField.d.ts +1 -15
  42. package/dist/components/ra-fields/BaseAttachmentField.d.ts.map +1 -1
  43. package/dist/components/ra-fields/CoverField.d.ts +10 -31
  44. package/dist/components/ra-fields/CoverField.d.ts.map +1 -1
  45. package/dist/components/ra-fields/DateAgoField.d.ts +6 -8
  46. package/dist/components/ra-fields/DateAgoField.d.ts.map +1 -1
  47. package/dist/components/ra-fields/DateField.d.ts +3 -5
  48. package/dist/components/ra-fields/DateField.d.ts.map +1 -1
  49. package/dist/components/ra-fields/EmailField.d.ts +3 -16
  50. package/dist/components/ra-fields/EmailField.d.ts.map +1 -1
  51. package/dist/components/ra-fields/FileField.d.ts +8 -25
  52. package/dist/components/ra-fields/FileField.d.ts.map +1 -1
  53. package/dist/components/ra-fields/FunctionField.d.ts +3 -6
  54. package/dist/components/ra-fields/FunctionField.d.ts.map +1 -1
  55. package/dist/components/ra-fields/ImageField.d.ts +3 -18
  56. package/dist/components/ra-fields/ImageField.d.ts.map +1 -1
  57. package/dist/components/ra-fields/LocalizedTextField.d.ts +3 -2
  58. package/dist/components/ra-fields/LocalizedTextField.d.ts.map +1 -1
  59. package/dist/components/ra-fields/ReadonlyField.d.ts +1 -1
  60. package/dist/components/ra-fields/ReadonlyField.d.ts.map +1 -1
  61. package/dist/components/ra-fields/ReferenceManyField.d.ts +7 -16
  62. package/dist/components/ra-fields/ReferenceManyField.d.ts.map +1 -1
  63. package/dist/components/ra-fields/SizeField.d.ts +6 -11
  64. package/dist/components/ra-fields/SizeField.d.ts.map +1 -1
  65. package/dist/components/ra-fields/TextField.d.ts +3 -5
  66. package/dist/components/ra-fields/TextField.d.ts.map +1 -1
  67. package/dist/components/ra-fields/index.d.ts +14 -15
  68. package/dist/components/ra-fields/index.d.ts.map +1 -1
  69. package/dist/components/ra-forms/CardForm.d.ts +22 -26
  70. package/dist/components/ra-forms/CardForm.d.ts.map +1 -1
  71. package/dist/components/ra-forms/ChangePasswordForm.d.ts +2 -1
  72. package/dist/components/ra-forms/ChangePasswordForm.d.ts.map +1 -1
  73. package/dist/components/ra-forms/Create.d.ts +3 -4
  74. package/dist/components/ra-forms/Create.d.ts.map +1 -1
  75. package/dist/components/ra-forms/Edit.d.ts +3 -2
  76. package/dist/components/ra-forms/Edit.d.ts.map +1 -1
  77. package/dist/components/ra-forms/FormHeader.d.ts +4 -20
  78. package/dist/components/ra-forms/FormHeader.d.ts.map +1 -1
  79. package/dist/components/ra-forms/LongForm/Content.d.ts +1 -1
  80. package/dist/components/ra-forms/LongForm/Content.d.ts.map +1 -1
  81. package/dist/components/ra-forms/LongForm/Form.d.ts +1 -1
  82. package/dist/components/ra-forms/LongForm/Form.d.ts.map +1 -1
  83. package/dist/components/ra-forms/LongForm/NavMenu.d.ts.map +1 -1
  84. package/dist/components/ra-forms/LongForm/Provider.d.ts.map +1 -1
  85. package/dist/components/ra-forms/LongForm/Sidebar.d.ts +1 -1
  86. package/dist/components/ra-forms/LongForm/Sidebar.d.ts.map +1 -1
  87. package/dist/components/ra-forms/LongForm/Tab.d.ts +2 -2
  88. package/dist/components/ra-forms/LongForm/Tab.d.ts.map +1 -1
  89. package/dist/components/ra-forms/LongForm/hooks.d.ts.map +1 -1
  90. package/dist/components/ra-forms/LongForm/index.d.ts +2 -2
  91. package/dist/components/ra-forms/LongForm/index.d.ts.map +1 -1
  92. package/dist/components/ra-forms/LongForm/utils.d.ts +1 -1
  93. package/dist/components/ra-forms/LongForm/utils.d.ts.map +1 -1
  94. package/dist/components/ra-forms/Show.d.ts +3 -12
  95. package/dist/components/ra-forms/Show.d.ts.map +1 -1
  96. package/dist/components/ra-forms/SimpleForm.d.ts +1 -30
  97. package/dist/components/ra-forms/SimpleForm.d.ts.map +1 -1
  98. package/dist/components/ra-forms/SimpleFormIterator.d.ts +1 -3
  99. package/dist/components/ra-forms/SimpleFormIterator.d.ts.map +1 -1
  100. package/dist/components/ra-forms/TabbedForm.d.ts +5 -9
  101. package/dist/components/ra-forms/TabbedForm.d.ts.map +1 -1
  102. package/dist/components/ra-forms/TableForm/TableFormIterator.d.ts +21 -22
  103. package/dist/components/ra-forms/TableForm/TableFormIterator.d.ts.map +1 -1
  104. package/dist/components/ra-forms/TableForm/TableFormIteratorItem.d.ts +1 -1
  105. package/dist/components/ra-forms/TableForm/TableFormIteratorItem.d.ts.map +1 -1
  106. package/dist/components/ra-forms/TableForm/index.d.ts +1 -2
  107. package/dist/components/ra-forms/TableForm/index.d.ts.map +1 -1
  108. package/dist/components/ra-forms/Toolbar.d.ts +3 -9
  109. package/dist/components/ra-forms/Toolbar.d.ts.map +1 -1
  110. package/dist/components/ra-forms/index.d.ts +12 -14
  111. package/dist/components/ra-forms/index.d.ts.map +1 -1
  112. package/dist/components/ra-inputs/ArrayInput.d.ts +3 -2
  113. package/dist/components/ra-inputs/ArrayInput.d.ts.map +1 -1
  114. package/dist/components/ra-inputs/AttachmentInput.d.ts +2 -32
  115. package/dist/components/ra-inputs/AttachmentInput.d.ts.map +1 -1
  116. package/dist/components/ra-inputs/AutocompleteArrayInput.d.ts +3 -7
  117. package/dist/components/ra-inputs/AutocompleteArrayInput.d.ts.map +1 -1
  118. package/dist/components/ra-inputs/AutocompleteInput.d.ts +3 -5
  119. package/dist/components/ra-inputs/AutocompleteInput.d.ts.map +1 -1
  120. package/dist/components/ra-inputs/BooleanInput.d.ts +3 -22
  121. package/dist/components/ra-inputs/BooleanInput.d.ts.map +1 -1
  122. package/dist/components/ra-inputs/DateInput.d.ts +3 -16
  123. package/dist/components/ra-inputs/DateInput.d.ts.map +1 -1
  124. package/dist/components/ra-inputs/DateTimeInput.d.ts +2 -19
  125. package/dist/components/ra-inputs/DateTimeInput.d.ts.map +1 -1
  126. package/dist/components/ra-inputs/FileInput.d.ts +9 -32
  127. package/dist/components/ra-inputs/FileInput.d.ts.map +1 -1
  128. package/dist/components/ra-inputs/ImageInput.d.ts +9 -12
  129. package/dist/components/ra-inputs/ImageInput.d.ts.map +1 -1
  130. package/dist/components/ra-inputs/LabeledArrayInput.d.ts +2 -24
  131. package/dist/components/ra-inputs/LabeledArrayInput.d.ts.map +1 -1
  132. package/dist/components/ra-inputs/LabeledInput.d.ts +1 -20
  133. package/dist/components/ra-inputs/LabeledInput.d.ts.map +1 -1
  134. package/dist/components/ra-inputs/LocalizedTextInput.d.ts +2 -2
  135. package/dist/components/ra-inputs/LocalizedTextInput.d.ts.map +1 -1
  136. package/dist/components/ra-inputs/NumberInput.d.ts +3 -22
  137. package/dist/components/ra-inputs/NumberInput.d.ts.map +1 -1
  138. package/dist/components/ra-inputs/RecordInput.d.ts +7 -13
  139. package/dist/components/ra-inputs/RecordInput.d.ts.map +1 -1
  140. package/dist/components/ra-inputs/ReferenceArrayInput.d.ts +6 -22
  141. package/dist/components/ra-inputs/ReferenceArrayInput.d.ts.map +1 -1
  142. package/dist/components/ra-inputs/ReferenceInput.d.ts +6 -23
  143. package/dist/components/ra-inputs/ReferenceInput.d.ts.map +1 -1
  144. package/dist/components/ra-inputs/ReferenceManyInput.d.ts +10 -12
  145. package/dist/components/ra-inputs/ReferenceManyInput.d.ts.map +1 -1
  146. package/dist/components/ra-inputs/SearchInput.d.ts +3 -1
  147. package/dist/components/ra-inputs/SearchInput.d.ts.map +1 -1
  148. package/dist/components/ra-inputs/SelectArrayInput.d.ts +3 -26
  149. package/dist/components/ra-inputs/SelectArrayInput.d.ts.map +1 -1
  150. package/dist/components/ra-inputs/SelectInput.d.ts +3 -2
  151. package/dist/components/ra-inputs/SelectInput.d.ts.map +1 -1
  152. package/dist/components/ra-inputs/SmartTextInput.d.ts +6 -26
  153. package/dist/components/ra-inputs/SmartTextInput.d.ts.map +1 -1
  154. package/dist/components/ra-inputs/TextInput.d.ts +2 -16
  155. package/dist/components/ra-inputs/TextInput.d.ts.map +1 -1
  156. package/dist/components/ra-inputs/TimeInput.d.ts +3 -16
  157. package/dist/components/ra-inputs/TimeInput.d.ts.map +1 -1
  158. package/dist/components/ra-inputs/index.d.ts +23 -24
  159. package/dist/components/ra-inputs/index.d.ts.map +1 -1
  160. package/dist/components/ra-lists/BulkActionsToolbar.d.ts +1 -8
  161. package/dist/components/ra-lists/BulkActionsToolbar.d.ts.map +1 -1
  162. package/dist/components/ra-lists/BulkFloatingActionsToolbar.d.ts +1 -7
  163. package/dist/components/ra-lists/BulkFloatingActionsToolbar.d.ts.map +1 -1
  164. package/dist/components/ra-lists/Datagrid/Datagrid.d.ts +1 -1
  165. package/dist/components/ra-lists/Datagrid/Datagrid.d.ts.map +1 -1
  166. package/dist/components/ra-lists/Datagrid/DatagridContextProvider.d.ts +1 -1
  167. package/dist/components/ra-lists/Datagrid/DatagridContextProvider.d.ts.map +1 -1
  168. package/dist/components/ra-lists/Datagrid/index.d.ts +1 -4
  169. package/dist/components/ra-lists/Datagrid/index.d.ts.map +1 -1
  170. package/dist/components/ra-lists/Empty.d.ts +1 -11
  171. package/dist/components/ra-lists/Empty.d.ts.map +1 -1
  172. package/dist/components/ra-lists/List.d.ts +2 -26
  173. package/dist/components/ra-lists/List.d.ts.map +1 -1
  174. package/dist/components/ra-lists/ListView.d.ts +1 -16
  175. package/dist/components/ra-lists/ListView.d.ts.map +1 -1
  176. package/dist/components/ra-lists/NotificationList/NotificationList.d.ts +4 -3
  177. package/dist/components/ra-lists/NotificationList/NotificationList.d.ts.map +1 -1
  178. package/dist/components/ra-lists/NotificationList/buttons/MarkAsReadedButton.d.ts +4 -0
  179. package/dist/components/ra-lists/NotificationList/buttons/MarkAsReadedButton.d.ts.map +1 -0
  180. package/dist/components/ra-lists/NotificationList/buttons/MarkAsUnreadedButton.d.ts +4 -0
  181. package/dist/components/ra-lists/NotificationList/buttons/MarkAsUnreadedButton.d.ts.map +1 -0
  182. package/dist/components/ra-lists/NotificationList/buttons/index.d.ts +3 -0
  183. package/dist/components/ra-lists/NotificationList/buttons/index.d.ts.map +1 -0
  184. package/dist/components/ra-lists/NotificationList/fields/NotificationField.d.ts +4 -0
  185. package/dist/components/ra-lists/NotificationList/fields/NotificationField.d.ts.map +1 -0
  186. package/dist/components/ra-lists/NotificationList/fields/index.d.ts +2 -0
  187. package/dist/components/ra-lists/NotificationList/fields/index.d.ts.map +1 -0
  188. package/dist/components/ra-lists/NotificationList/index.d.ts +1 -2
  189. package/dist/components/ra-lists/NotificationList/index.d.ts.map +1 -1
  190. package/dist/components/ra-lists/SimpleList.d.ts +3 -3
  191. package/dist/components/ra-lists/SimpleList.d.ts.map +1 -1
  192. package/dist/components/ra-lists/index.d.ts +7 -7
  193. package/dist/components/ra-lists/index.d.ts.map +1 -1
  194. package/dist/components/ra-pages/LoginPage.d.ts +2 -16
  195. package/dist/components/ra-pages/LoginPage.d.ts.map +1 -1
  196. package/dist/react-admin.cjs.js +67 -67
  197. package/dist/react-admin.cjs.js.map +1 -1
  198. package/dist/react-admin.es.js +11554 -12406
  199. package/dist/react-admin.es.js.map +1 -1
  200. package/dist/react-admin.umd.js +67 -67
  201. package/dist/react-admin.umd.js.map +1 -1
  202. package/package.json +1 -1
  203. package/src/{Admin.jsx → Admin.tsx} +6 -14
  204. package/src/AdminContext.tsx +12 -14
  205. package/src/ApplicaAdmin.tsx +22 -38
  206. package/src/components/@extended/Breadcrumbs.jsx +2 -6
  207. package/src/components/AuthBackground.tsx +2 -2
  208. package/src/components/Layout/Drawer/Drawer.tsx +2 -3
  209. package/src/components/Layout/Drawer/DrawerHeader.tsx +2 -2
  210. package/src/components/Layout/Drawer/DrawerHeaderStyled.jsx +2 -8
  211. package/src/components/Layout/Footer.tsx +2 -13
  212. package/src/components/Layout/Header/AppBarStyled.tsx +29 -0
  213. package/src/components/Layout/Layout.tsx +0 -1
  214. package/src/components/Notification.tsx +15 -0
  215. package/src/components/index.jsx +1 -0
  216. package/src/components/ra-buttons/CreateInDialogButton.tsx +11 -47
  217. package/src/components/ra-buttons/{EditInDialogButton.jsx → EditInDialogButton.tsx} +20 -21
  218. package/src/components/ra-buttons/{ImpersonateUserButton.jsx → ImpersonateUserButton.tsx} +8 -9
  219. package/src/components/ra-buttons/index.ts +3 -0
  220. package/src/components/ra-custom/ListItem.tsx +4 -39
  221. package/src/components/ra-custom/index.ts +1 -0
  222. package/src/components/ra-fields/{ActionsField.jsx → ActionsField.tsx} +8 -16
  223. package/src/components/ra-fields/AttachmentField.tsx +4 -14
  224. package/src/components/ra-fields/BaseAttachmentField.tsx +2 -16
  225. package/src/components/ra-fields/{CoverField.jsx → CoverField.tsx} +17 -28
  226. package/src/components/ra-fields/{DateAgoField.jsx → DateAgoField.tsx} +8 -11
  227. package/src/components/ra-fields/DateField.tsx +14 -0
  228. package/src/components/ra-fields/EmailField.tsx +13 -0
  229. package/src/components/ra-fields/{FileField.jsx → FileField.tsx} +17 -13
  230. package/src/components/ra-fields/FunctionField.tsx +7 -0
  231. package/src/components/ra-fields/{ImageField.jsx → ImageField.tsx} +3 -9
  232. package/src/components/ra-fields/LocalizedTextField.tsx +3 -3
  233. package/src/components/ra-fields/ReadonlyField.tsx +4 -3
  234. package/src/components/ra-fields/ReferenceManyField.tsx +24 -35
  235. package/src/components/ra-fields/{SizeField.jsx → SizeField.tsx} +8 -9
  236. package/src/components/ra-fields/TextField.tsx +14 -0
  237. package/src/components/ra-fields/index.ts +14 -0
  238. package/src/components/ra-forms/CardForm.tsx +102 -0
  239. package/src/components/ra-forms/ChangePasswordForm.tsx +4 -6
  240. package/src/components/ra-forms/Create.tsx +6 -8
  241. package/src/components/ra-forms/{Edit.jsx → Edit.tsx} +5 -5
  242. package/src/components/ra-forms/FormHeader.tsx +5 -23
  243. package/src/components/ra-forms/LongForm/Content.tsx +1 -1
  244. package/src/components/ra-forms/LongForm/Form.tsx +3 -3
  245. package/src/components/ra-forms/LongForm/NavMenu.tsx +3 -3
  246. package/src/components/ra-forms/LongForm/Provider.tsx +3 -4
  247. package/src/components/ra-forms/LongForm/Sidebar.tsx +2 -2
  248. package/src/components/ra-forms/LongForm/Tab.tsx +5 -5
  249. package/src/components/ra-forms/LongForm/hooks.tsx +3 -3
  250. package/src/components/ra-forms/LongForm/index.ts +3 -13
  251. package/src/components/ra-forms/LongForm/utils.ts +1 -1
  252. package/src/components/ra-forms/Show.tsx +21 -19
  253. package/src/components/ra-forms/SimpleForm.tsx +23 -40
  254. package/src/components/ra-forms/SimpleFormIterator.tsx +26 -24
  255. package/src/components/ra-forms/TabbedForm.tsx +36 -27
  256. package/src/components/ra-forms/TableForm/TableFormIterator.tsx +6 -34
  257. package/src/components/ra-forms/TableForm/TableFormIteratorItem.tsx +3 -4
  258. package/src/components/ra-forms/TableForm/index.ts +1 -3
  259. package/src/components/ra-forms/{Toolbar.jsx → Toolbar.tsx} +6 -11
  260. package/src/components/ra-forms/index.ts +12 -0
  261. package/src/components/ra-inputs/ArrayInput.tsx +15 -15
  262. package/src/components/ra-inputs/AttachmentInput.tsx +17 -25
  263. package/src/components/ra-inputs/AutocompleteArrayInput.tsx +27 -0
  264. package/src/components/ra-inputs/{AutocompleteInput.jsx → AutocompleteInput.tsx} +8 -18
  265. package/src/components/ra-inputs/{BooleanInput.jsx → BooleanInput.tsx} +8 -15
  266. package/src/components/ra-inputs/DateInput.tsx +24 -0
  267. package/src/components/ra-inputs/DateTimeInput.tsx +10 -18
  268. package/src/components/ra-inputs/{FileInput.jsx → FileInput.tsx} +28 -29
  269. package/src/components/ra-inputs/ImageInput.tsx +44 -0
  270. package/src/components/ra-inputs/LabeledArrayInput.tsx +8 -31
  271. package/src/components/ra-inputs/LabeledInput.tsx +12 -24
  272. package/src/components/ra-inputs/LocalizedTextInput.tsx +7 -7
  273. package/src/components/ra-inputs/NumberInput.tsx +24 -0
  274. package/src/components/ra-inputs/{RecordInput.jsx → RecordInput.tsx} +20 -18
  275. package/src/components/ra-inputs/ReferenceArrayInput.tsx +19 -0
  276. package/src/components/ra-inputs/ReferenceInput.tsx +19 -0
  277. package/src/components/ra-inputs/ReferenceManyInput.tsx +26 -0
  278. package/src/components/ra-inputs/SearchInput.tsx +12 -0
  279. package/src/components/ra-inputs/SelectArrayInput.tsx +33 -0
  280. package/src/components/ra-inputs/SelectInput.tsx +8 -10
  281. package/src/components/ra-inputs/{SmartTextInput.jsx → SmartTextInput.tsx} +10 -20
  282. package/src/components/ra-inputs/TextInput.tsx +9 -12
  283. package/src/components/ra-inputs/TimeInput.tsx +39 -0
  284. package/src/components/ra-inputs/index.ts +23 -0
  285. package/src/components/ra-lists/BulkActionsToolbar.tsx +6 -15
  286. package/src/components/ra-lists/BulkFloatingActionsToolbar.tsx +5 -9
  287. package/src/components/ra-lists/Datagrid/Datagrid.tsx +5 -6
  288. package/src/components/ra-lists/Datagrid/DatagridContextProvider.tsx +1 -1
  289. package/src/components/ra-lists/Datagrid/index.tsx +2 -6
  290. package/src/components/ra-lists/Empty.tsx +5 -16
  291. package/src/components/ra-lists/List.tsx +11 -47
  292. package/src/components/ra-lists/ListView.tsx +4 -19
  293. package/src/components/ra-lists/NotificationList/{NotificationList.jsx → NotificationList.tsx} +7 -8
  294. package/src/components/ra-lists/NotificationList/{button/MarkAsReadedButton.jsx → buttons/MarkAsReadedButton.tsx} +9 -9
  295. package/src/components/ra-lists/NotificationList/{button/MarkAsUnreadedButton.jsx → buttons/MarkAsUnreadedButton.tsx} +7 -6
  296. package/src/components/ra-lists/NotificationList/buttons/index.ts +2 -0
  297. package/src/components/ra-lists/NotificationList/{field/NotificationField.jsx → fields/NotificationField.tsx} +5 -5
  298. package/src/components/ra-lists/NotificationList/fields/index.ts +1 -0
  299. package/src/components/ra-lists/NotificationList/index.ts +1 -0
  300. package/src/components/ra-lists/SimpleList.tsx +2 -2
  301. package/src/components/ra-lists/index.ts +7 -7
  302. package/src/components/ra-pages/LoginPage.tsx +11 -16
  303. package/vite.config.js +84 -71
  304. package/dist/components/ra-lists/NotificationList/button/MarkAsReadedButton.d.ts +0 -3
  305. package/dist/components/ra-lists/NotificationList/button/MarkAsReadedButton.d.ts.map +0 -1
  306. package/dist/components/ra-lists/NotificationList/button/MarkAsUnreadedButton.d.ts +0 -3
  307. package/dist/components/ra-lists/NotificationList/button/MarkAsUnreadedButton.d.ts.map +0 -1
  308. package/dist/components/ra-lists/NotificationList/button/index.d.ts +0 -3
  309. package/dist/components/ra-lists/NotificationList/button/index.d.ts.map +0 -1
  310. package/dist/components/ra-lists/NotificationList/field/NotificationField.d.ts +0 -3
  311. package/dist/components/ra-lists/NotificationList/field/NotificationField.d.ts.map +0 -1
  312. package/dist/components/ra-lists/NotificationList/field/index.d.ts +0 -2
  313. package/dist/components/ra-lists/NotificationList/field/index.d.ts.map +0 -1
  314. package/src/components/Layout/Header/AppBarStyled.jsx +0 -32
  315. package/src/components/Notification.jsx +0 -13
  316. package/src/components/ra-buttons/index.jsx +0 -4
  317. package/src/components/ra-custom/index.tsx +0 -2
  318. package/src/components/ra-fields/DateField.jsx +0 -27
  319. package/src/components/ra-fields/EmailField.jsx +0 -27
  320. package/src/components/ra-fields/FunctionField.jsx +0 -9
  321. package/src/components/ra-fields/TextField.jsx +0 -27
  322. package/src/components/ra-fields/index.jsx +0 -30
  323. package/src/components/ra-forms/CardForm.jsx +0 -107
  324. package/src/components/ra-forms/index.jsx +0 -29
  325. package/src/components/ra-inputs/AutocompleteArrayInput.jsx +0 -35
  326. package/src/components/ra-inputs/DateInput.jsx +0 -30
  327. package/src/components/ra-inputs/ImageInput.jsx +0 -45
  328. package/src/components/ra-inputs/NumberInput.jsx +0 -28
  329. package/src/components/ra-inputs/ReferenceArrayInput.jsx +0 -23
  330. package/src/components/ra-inputs/ReferenceInput.jsx +0 -23
  331. package/src/components/ra-inputs/ReferenceManyInput.jsx +0 -33
  332. package/src/components/ra-inputs/SearchInput.jsx +0 -14
  333. package/src/components/ra-inputs/SelectArrayInput.jsx +0 -47
  334. package/src/components/ra-inputs/TimeInput.jsx +0 -46
  335. package/src/components/ra-inputs/index.jsx +0 -48
  336. package/src/components/ra-lists/NotificationList/button/index.jsx +0 -2
  337. package/src/components/ra-lists/NotificationList/field/index.jsx +0 -1
  338. 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 PropTypes from 'prop-types';
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
- * Consente di visualizzare un array di input con un label e un helper text con lo stile del tema Mantis.
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
- const LabeledArrayInput = ({
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
- const LabeledInput = ({ label, children, display, helperText, sx, addLabel, divider, ...props }: LabeledInputProps): JSX.Element => {
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
- function LocalizedTextInput(props: ILocalizedTextInputProps) {
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 React, { useCallback, useEffect, useState } from 'react';
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
- import PropTypes from 'prop-types';
5
- import { TextField } from '@mui/material';
6
- import { get } from 'lodash';
6
+ export type RecordInputProps = {
7
+ source: string;
8
+ minWidth?: number;
9
+ children?: React.ReactElement;
10
+ };
7
11
 
8
- const RecordInput = ({ source, minWidth = 300, children }) => {
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
- const SelectInput = (props: SelectInputProps) => (
19
- <LabeledInput {...props}>
20
- <ApplicaStyledSelectInput />
21
- </LabeledInput>
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
- const SmartTextInput = ({ ...props }) => {
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
- const TextInput = (props: TextInputProps) => (
6
- // @ts-ignore
7
- <LabeledInput {...props}>
8
- {/* @ts-ignore */}
9
- <RaTextInput />
10
- </LabeledInput>
11
- );
12
- TextInput.propTypes = {
13
- ...RaTextInput.propTypes,
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
- import IconButton from '@mui/material/IconButton';
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
- const BulkFloatingActionsToolbar = (props: BulkFloatingActionsToolbarProps) => {
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[];