@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
@@ -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 BulkActionsToolbar from '../BulkActionsToolbar';
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
- const Datagrid = (props: DatagridProps): JSX.Element => {
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
- const Empty = ({ actions, className, ...props }: EmptyProps): JSX.Element => {
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 ApplicaStyledList = styled(RaList, {
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
- // La barra delle operazioni massive di react-admin non è perfettamente
130
- // compatibile con il tema mantis, peratnto ho dovuto apportare una serie
131
- // di correzioni per allinearla correttamente e consentirne l'utilizzo anche
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
- const List = (props: ListProps): JSX.Element => {
189
+ export function List(props: ListProps): ReactElement {
222
190
  return (
223
191
  <MainCard content={false}>
224
- <ApplicaStyledList {...props} />
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 { Title, TitlePropType, Pagination as DefaultPagination, ListToolbar, ListActions as DefaultActions, Empty } from 'react-admin';
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.
@@ -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 { NotificationField } from './field';
4
+ import { MarkAsReadedButton, MarkAsUnreadedButton } from './buttons';
5
+ import { NotificationField } from './fields';
6
+ import { useMemo } from 'react';
7
+ import ActionsMenu from '../../ActionsMenu';
9
8
 
10
- const NotificationList = ({ ...props }) => {
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
- const MarkAsReadedButton = () => {
15
+ export function MarkAsReadedButton(): JSX.Element {
17
16
  const refresh = useRefresh();
18
17
  const notify = useNotify();
19
- const unselectAll = useUnselectAll();
20
- const resource = useResourceContext();
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(resource);
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
- const MarkAsUnreadedButton = () => {
15
+ export function MarkAsUnreadedButton(): JSX.Element {
16
16
  const refresh = useRefresh();
17
17
  const notify = useNotify();
18
- const unselectAll = useUnselectAll();
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('notifications');
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;
@@ -0,0 +1,2 @@
1
+ export * from './MarkAsReadedButton';
2
+ export * from './MarkAsUnreadedButton';
@@ -1,10 +1,10 @@
1
1
  import { Box, Typography } from '@mui/material';
2
- import React, { useCallback, useMemo } from 'react';
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
- const NotificationField = (props) => {
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
- onFailure: () => {
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 StyledSimpleList = styled(RaSimpleList, {
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 StyledSimpleList;
13
+ export default SimpleList;
@@ -1,7 +1,7 @@
1
- export { default as BulkActionsToolbar } from './BulkActionsToolbar';
2
- export { default as BulkFloatingActionsToolbar } from './BulkFloatingActionsToolbar';
3
- export { default as Datagrid } from './Datagrid';
4
- export { default as Empty } from './Empty';
5
- export { default as List } from './List';
6
- export { default as NotificationList } from './NotificationList';
7
- export { default as SimpleList } from './SimpleList';
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
- const LoginPage = ({ version, name, copy, logo, enablePasswordRecover, enableRegistration, redirectTo, background }: LoginPageProps) => {
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
- export default defineConfig((configEnv) => ({
11
- resolve: {
12
- alias: {
13
- // eslint-disable-next-line no-undef
14
- '@applica-software-guru/react-admin': resolve(__dirname, 'src')
15
- }
16
- },
17
- plugins: [
18
- dts({
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
- rollupOptions: {
39
- onwarn(warning, warn) {
40
- if (warning.code === 'MODULE_LEVEL_DIRECTIVE' && warning.message.includes(`'use client'`)) {
41
- return;
42
- }
43
- warn(warning);
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
- external: Object.keys(packageJson.peerDependencies || {}).concat([
46
- '@ant-design/icons',
47
- '@emotion/react',
48
- '@emotion/styled',
49
- '@mui/icons-material',
50
- '@mui/material',
51
- 'ra-core',
52
- 'ra-i18n-polyglot',
53
- 'react-admin',
54
- 'react-hook-form',
55
- 'react-query',
56
- 'react-router-dom',
57
- 'react-router',
58
- 'react/jsx-runtime',
59
- 'react-refresh'
60
- ]),
61
- output: {
62
- globals: {
63
- '@ant-design/icons': '@ant-design/icons',
64
- '@emotion/react': '@emotion/react',
65
- '@emotion/styled': '@emotion/styled',
66
- '@mui/icons-material': '@mui/icons-material',
67
- '@mui/material': '@mui/material',
68
- '@mui/base': '@mui/base',
69
- 'ra-core': 'ra-core',
70
- 'ra-i18n-polyglot': 'ra-i18n-polyglot',
71
- 'ra-ui-materialui': 'ra-ui-materialui',
72
- 'react-admin': 'react-admin',
73
- 'react-dom': 'ReactDOM',
74
- 'react-hook-form': 'react-hook-form',
75
- 'react-query': 'react-query',
76
- 'react-router-dom': 'react-router-dom',
77
- 'react-router': 'react-router',
78
- 'react/jsx-runtime': 'react/jsx-runtime',
79
- 'react-refresh': 'react-refresh',
80
- react: 'React'
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,3 +0,0 @@
1
- export default MarkAsReadedButton;
2
- declare function MarkAsReadedButton(): import("react/jsx-runtime").JSX.Element;
3
- //# sourceMappingURL=MarkAsReadedButton.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MarkAsReadedButton.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ra-lists/NotificationList/button/MarkAsReadedButton.jsx"],"names":[],"mappings":";AAeA,+EAmCC"}