fastapi-rtk 1.1.5 → 2.0.0

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 (285) hide show
  1. package/dist/.bundled/jsonforms/cjs/_virtual/index10.cjs +2 -2
  2. package/dist/.bundled/jsonforms/cjs/_virtual/index3.cjs +2 -2
  3. package/dist/.bundled/jsonforms/cjs/_virtual/index4.cjs +2 -2
  4. package/dist/.bundled/jsonforms/cjs/_virtual/index5.cjs +2 -2
  5. package/dist/.bundled/jsonforms/cjs/_virtual/index6.cjs +2 -2
  6. package/dist/.bundled/jsonforms/cjs/_virtual/index7.cjs +2 -2
  7. package/dist/.bundled/jsonforms/cjs/_virtual/index8.cjs +2 -2
  8. package/dist/.bundled/jsonforms/cjs/_virtual/index9.cjs +2 -2
  9. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/MantineInputs/MantineFileInput.cjs +1 -1
  10. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/complex/MantineTableControl/MantineTableControl.cjs +1 -1
  11. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/hooks/useNavigationComponent.cjs +4 -4
  12. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/hooks/useToolbarComponent.cjs +5 -5
  13. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/layouts/Array/MantineArrayLayout.cjs +6 -6
  14. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/layouts/Group/variants/GroupFieldset.cjs +4 -4
  15. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/layouts/MantineHotizontalLayoutRenderer.cjs +2 -2
  16. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/layouts/MantineVerticalLayoutRenderer.cjs +2 -2
  17. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/testers/isJsonArrayControl.cjs +1 -1
  18. package/dist/.bundled/jsonforms/esm/_virtual/index10.mjs +2 -2
  19. package/dist/.bundled/jsonforms/esm/_virtual/index3.mjs +2 -2
  20. package/dist/.bundled/jsonforms/esm/_virtual/index4.mjs +2 -2
  21. package/dist/.bundled/jsonforms/esm/_virtual/index5.mjs +2 -2
  22. package/dist/.bundled/jsonforms/esm/_virtual/index6.mjs +2 -2
  23. package/dist/.bundled/jsonforms/esm/_virtual/index7.mjs +2 -2
  24. package/dist/.bundled/jsonforms/esm/_virtual/index8.mjs +2 -2
  25. package/dist/.bundled/jsonforms/esm/_virtual/index9.mjs +2 -2
  26. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/MantineInputs/MantineFileInput.mjs +1 -1
  27. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/complex/MantineTableControl/MantineTableControl.mjs +1 -1
  28. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/hooks/useNavigationComponent.mjs +1 -1
  29. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/hooks/useToolbarComponent.mjs +1 -1
  30. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/layouts/Array/MantineArrayLayout.mjs +1 -1
  31. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/layouts/Group/variants/GroupFieldset.mjs +1 -1
  32. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/layouts/MantineHotizontalLayoutRenderer.mjs +1 -1
  33. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/layouts/MantineVerticalLayoutRenderer.mjs +1 -1
  34. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/testers/isJsonArrayControl.mjs +1 -1
  35. package/dist/.bundled/jsonforms/lib/smoke.test.d.ts +1 -0
  36. package/dist/.external/cjs/ajv@8.20.0/ajv/dist/compile/codegen/index.cjs +1 -1
  37. package/dist/.external/cjs/ajv@8.20.0/ajv/dist/compile/index.cjs +1 -1
  38. package/dist/.external/cjs/ajv@8.20.0/ajv/dist/compile/validate/index.cjs +1 -1
  39. package/dist/.external/cjs/ajv@8.20.0/ajv/dist/vocabularies/applicator/index.cjs +1 -1
  40. package/dist/.external/cjs/ajv@8.20.0/ajv/dist/vocabularies/core/index.cjs +1 -1
  41. package/dist/.external/cjs/ajv@8.20.0/ajv/dist/vocabularies/discriminator/index.cjs +1 -1
  42. package/dist/.external/cjs/ajv@8.20.0/ajv/dist/vocabularies/format/index.cjs +1 -1
  43. package/dist/.external/cjs/ajv@8.20.0/ajv/dist/vocabularies/validation/index.cjs +1 -1
  44. package/dist/.external/esm/ajv@8.20.0/ajv/dist/compile/codegen/index.mjs +1 -1
  45. package/dist/.external/esm/ajv@8.20.0/ajv/dist/compile/index.mjs +1 -1
  46. package/dist/.external/esm/ajv@8.20.0/ajv/dist/compile/validate/index.mjs +1 -1
  47. package/dist/.external/esm/ajv@8.20.0/ajv/dist/vocabularies/applicator/index.mjs +1 -1
  48. package/dist/.external/esm/ajv@8.20.0/ajv/dist/vocabularies/core/index.mjs +1 -1
  49. package/dist/.external/esm/ajv@8.20.0/ajv/dist/vocabularies/discriminator/index.mjs +1 -1
  50. package/dist/.external/esm/ajv@8.20.0/ajv/dist/vocabularies/format/index.mjs +1 -1
  51. package/dist/.external/esm/ajv@8.20.0/ajv/dist/vocabularies/validation/index.mjs +1 -1
  52. package/dist/.external/esm/mantine-react-table@2.0.0-beta.9_@mantine_core@7.17.8_@mantine_dates@7.17.8_@mantine_hooks@7._2zjbhqlotlhjxtgwdmcgs6toey/mantine-react-table/dist/index.esm.mjs +3 -3
  53. package/dist/constants/lib/index.test.d.ts +1 -0
  54. package/dist/core/cjs/ActionIcons/Add/Add.cjs +3 -5
  55. package/dist/core/cjs/ActionIcons/Delete/Delete.cjs +16 -13
  56. package/dist/core/cjs/ActionIcons/Download/Download.cjs +7 -9
  57. package/dist/core/cjs/ActionIcons/Edit/Edit.cjs +21 -18
  58. package/dist/core/cjs/ActionIcons/Refresh/Refresh.cjs +15 -13
  59. package/dist/core/cjs/ActionIcons/Upload/Upload.cjs +9 -10
  60. package/dist/core/cjs/ActionIcons/View/View.cjs +21 -18
  61. package/dist/core/cjs/ActionIcons/utils/BaseActionIcon.cjs +15 -0
  62. package/dist/core/cjs/Dialogs/AddDialog.cjs +10 -8
  63. package/dist/core/cjs/Dialogs/DeleteDialog.cjs +9 -4
  64. package/dist/core/cjs/Dialogs/EditDialog.cjs +24 -9
  65. package/dist/core/cjs/Tables/DataGrid/Toolbar/Filter/FilterMenu.cjs +1 -1
  66. package/dist/core/cjs/Tables/NextGenDataGrid/NextGenDataGrid.cjs +4 -4
  67. package/dist/core/cjs/Tables/NextGenDataGrid/components/OptimizedMRT_RowSelectColumn/getOptimizedMRT_RowSelectColumnDef.cjs +3 -3
  68. package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/AdvancedFilters.cjs +1 -1
  69. package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useToolbar/basicToolbars.cjs +6 -6
  70. package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useToolbar/mrtToolbars.cjs +96 -0
  71. package/dist/core/cjs/Tables/NextGenDataGrid/patch/MRT_TableContainer.cjs +1 -1
  72. package/dist/core/cjs/Tables/NextGenDataGrid/patch/body/MRT_TableBodyRow.cjs +1 -1
  73. package/dist/core/cjs/Tables/NextGenDataGrid/patch/head/MRT_TableHead.cjs +1 -1
  74. package/dist/core/cjs/Tables/NextGenDataGrid/patch/toolbar/MRT_ToolbarAlertBanner.cjs +37 -30
  75. package/dist/core/cjs/Wrappers/ApiProvider/ApiProvider.cjs +0 -2
  76. package/dist/core/cjs/Wrappers/ApiProvider/hooks/useProvideApi.cjs +2 -5
  77. package/dist/core/cjs/Wrappers/ApiProvider/hooks/utils/useApiActions.cjs +23 -94
  78. package/dist/core/esm/ActionIcons/Add/Add.mjs +3 -5
  79. package/dist/core/esm/ActionIcons/Delete/Delete.mjs +17 -14
  80. package/dist/core/esm/ActionIcons/Download/Download.mjs +8 -10
  81. package/dist/core/esm/ActionIcons/Edit/Edit.mjs +22 -19
  82. package/dist/core/esm/ActionIcons/Refresh/Refresh.mjs +15 -13
  83. package/dist/core/esm/ActionIcons/Upload/Upload.mjs +10 -11
  84. package/dist/core/esm/ActionIcons/View/View.mjs +22 -19
  85. package/dist/core/esm/ActionIcons/utils/BaseActionIcon.mjs +15 -0
  86. package/dist/core/esm/Dialogs/AddDialog.mjs +10 -8
  87. package/dist/core/esm/Dialogs/DeleteDialog.mjs +9 -4
  88. package/dist/core/esm/Dialogs/EditDialog.mjs +24 -9
  89. package/dist/core/esm/Tables/DataGrid/Toolbar/Filter/FilterMenu.mjs +1 -1
  90. package/dist/core/esm/Tables/NextGenDataGrid/NextGenDataGrid.mjs +4 -4
  91. package/dist/core/esm/Tables/NextGenDataGrid/components/OptimizedMRT_RowSelectColumn/getOptimizedMRT_RowSelectColumnDef.mjs +3 -3
  92. package/dist/core/esm/Tables/NextGenDataGrid/hooks/useColumns/AdvancedFilters.mjs +1 -1
  93. package/dist/core/esm/Tables/NextGenDataGrid/hooks/useToolbar/basicToolbars.mjs +6 -6
  94. package/dist/core/esm/Tables/NextGenDataGrid/hooks/useToolbar/mrtToolbars.mjs +96 -0
  95. package/dist/core/esm/Tables/NextGenDataGrid/patch/MRT_TableContainer.mjs +1 -1
  96. package/dist/core/esm/Tables/NextGenDataGrid/patch/body/MRT_TableBodyRow.mjs +1 -1
  97. package/dist/core/esm/Tables/NextGenDataGrid/patch/head/MRT_TableHead.mjs +1 -1
  98. package/dist/core/esm/Tables/NextGenDataGrid/patch/toolbar/MRT_ToolbarAlertBanner.mjs +37 -30
  99. package/dist/core/esm/Wrappers/ApiProvider/ApiProvider.mjs +0 -2
  100. package/dist/core/esm/Wrappers/ApiProvider/hooks/useProvideApi.mjs +2 -5
  101. package/dist/core/esm/Wrappers/ApiProvider/hooks/utils/useApiActions.mjs +23 -94
  102. package/dist/core/lib/ActionIcons/Actions.test.d.ts +1 -0
  103. package/dist/core/lib/ActionIcons/Add/Add.test.d.ts +1 -0
  104. package/dist/core/lib/ActionIcons/Delete/Delete.test.d.ts +1 -0
  105. package/dist/core/lib/ActionIcons/Download/Download.test.d.ts +1 -0
  106. package/dist/core/lib/ActionIcons/Edit/Edit.test.d.ts +1 -0
  107. package/dist/core/lib/ActionIcons/Refresh/Refresh.test.d.ts +1 -0
  108. package/dist/core/lib/ActionIcons/Upload/Upload.test.d.ts +1 -0
  109. package/dist/core/lib/ActionIcons/View/View.test.d.ts +1 -0
  110. package/dist/core/lib/ActionIcons/utils/BaseActionIcon.d.ts +18 -0
  111. package/dist/core/lib/ActionIcons/utils/BaseActionIcon.test.d.ts +1 -0
  112. package/dist/core/lib/Dialogs/AddDialog.test.d.ts +1 -0
  113. package/dist/core/lib/Dialogs/DeleteDialog.test.d.ts +1 -0
  114. package/dist/core/lib/Dialogs/EditDialog.test.d.ts +1 -0
  115. package/dist/core/lib/Dialogs/ViewDialog.test.d.ts +1 -0
  116. package/dist/core/lib/Inputs/DateTimePicker.test.d.ts +1 -0
  117. package/dist/core/lib/Inputs/TimePicker.test.d.ts +1 -0
  118. package/dist/core/lib/Menu/UserMenu/UserMenu.test.d.ts +1 -0
  119. package/dist/core/lib/Modals/CommonModal.test.d.ts +1 -0
  120. package/dist/core/lib/Modals/normalProps.test.d.ts +1 -0
  121. package/dist/core/lib/Modals/overlayProps.test.d.ts +1 -0
  122. package/dist/core/lib/Selectors/LanguageSelector.test.d.ts +1 -0
  123. package/dist/core/lib/Tables/DataGrid/DataGrid.test.d.ts +1 -0
  124. package/dist/core/lib/Tables/DataGrid/ErrorDialog.test.d.ts +1 -0
  125. package/dist/core/lib/Tables/NextGenDataGrid/FallbackWrapper.test.d.ts +1 -0
  126. package/dist/core/lib/Tables/NextGenDataGrid/NextGenDataGrid.test.d.ts +1 -0
  127. package/dist/core/lib/Tables/NextGenDataGrid/hooks/useToolbar/mrtToolbars.d.ts +5 -0
  128. package/dist/core/lib/Tables/NextGenDataGrid/utils.test.d.ts +1 -0
  129. package/dist/core/lib/Wrappers/ApiProvider/ApiProvider.d.ts +1 -6
  130. package/dist/core/lib/Wrappers/ApiProvider/ApiProvider.test.d.ts +1 -0
  131. package/dist/core/lib/Wrappers/ApiProvider/hooks/useProvideApi.d.ts +3 -3
  132. package/dist/core/lib/Wrappers/ApiProvider/hooks/useProvideApi.test.d.ts +1 -0
  133. package/dist/core/lib/Wrappers/ApiProvider/hooks/useProvideBulk.test.d.ts +1 -0
  134. package/dist/core/lib/Wrappers/ApiProvider/hooks/useProvideForm.test.d.ts +1 -0
  135. package/dist/core/lib/Wrappers/ApiProvider/hooks/utils/useApiActions.d.ts +2 -5
  136. package/dist/core/lib/Wrappers/ApiProvider/hooks/utils/useApiActions.test.d.ts +1 -0
  137. package/dist/core/lib/Wrappers/ApiProvider/hooks/utils/useLatest.test.d.ts +1 -0
  138. package/dist/core/lib/Wrappers/ApiProvider/hooks/utils/useStreamingData.test.d.ts +1 -0
  139. package/dist/core/lib/Wrappers/ApiProvider/utils/api/createItem.test.d.ts +1 -0
  140. package/dist/core/lib/Wrappers/ApiProvider/utils/api/deleteItem.test.d.ts +1 -0
  141. package/dist/core/lib/Wrappers/ApiProvider/utils/api/downloadItems.test.d.ts +1 -0
  142. package/dist/core/lib/Wrappers/ApiProvider/utils/api/formCreateItem.test.d.ts +1 -0
  143. package/dist/core/lib/Wrappers/ApiProvider/utils/api/formUpdateItem.test.d.ts +1 -0
  144. package/dist/core/lib/Wrappers/ApiProvider/utils/api/getInfo.test.d.ts +1 -0
  145. package/dist/core/lib/Wrappers/ApiProvider/utils/api/getItem.test.d.ts +1 -0
  146. package/dist/core/lib/Wrappers/ApiProvider/utils/api/getItems.test.d.ts +1 -0
  147. package/dist/core/lib/Wrappers/ApiProvider/utils/api/updateItem.test.d.ts +1 -0
  148. package/dist/core/lib/Wrappers/ApiProvider/utils/api/uploadItems.test.d.ts +1 -0
  149. package/dist/core/lib/Wrappers/ApiProvider/utils/bulkActions/postBulkAction.test.d.ts +1 -0
  150. package/dist/core/lib/Wrappers/ApiProvider/utils/convertInfo.test.d.ts +1 -0
  151. package/dist/core/lib/Wrappers/ApiProvider/utils/createQueryParams.test.d.ts +1 -0
  152. package/dist/core/lib/Wrappers/ApiProvider/utils/getDefaultValues.test.d.ts +1 -0
  153. package/dist/core/lib/Wrappers/ApiProvider/utils/getValidationSchema.test.d.ts +1 -0
  154. package/dist/core/lib/Wrappers/InfiniteScroll/InfiniteScroll.test.d.ts +1 -0
  155. package/dist/core/lib/Wrappers/LazyLoadWrapper/LazyLoadWrapper.test.d.ts +1 -0
  156. package/dist/core/lib/Wrappers/Provider/Provider.test.d.ts +1 -0
  157. package/dist/core/lib/Wrappers/Provider/hooks/useProvideAuth.test.d.ts +1 -0
  158. package/dist/core/lib/Wrappers/Provider/hooks/useProvideInfo.test.d.ts +1 -0
  159. package/dist/core/lib/Wrappers/Provider/hooks/useProvideLang.test.d.ts +1 -0
  160. package/dist/core/lib/Wrappers/Provider/utils/authFetch.test.d.ts +1 -0
  161. package/dist/core/lib/Wrappers/Provider/utils/userCRUD.test.d.ts +1 -0
  162. package/dist/core/lib/hooks/api/useApi.d.ts +8 -0
  163. package/dist/core/lib/hooks/api/useApi.test.d.ts +1 -0
  164. package/dist/core/lib/hooks/api/useBulkActions.test.d.ts +1 -0
  165. package/dist/core/lib/hooks/api/useForms.test.d.ts +1 -0
  166. package/dist/core/lib/hooks/auth/useAuth.test.d.ts +1 -0
  167. package/dist/core/lib/hooks/auth/useInfo.test.d.ts +1 -0
  168. package/dist/core/lib/hooks/lang/useLang.test.d.ts +1 -0
  169. package/dist/core/lib/test-helpers/uiWrap.d.ts +12 -0
  170. package/dist/hooks/lib/useActionIcon/useActionIcon.test.d.ts +1 -0
  171. package/dist/hooks/lib/useCustomFetch/useCustomFetch.test.d.ts +1 -0
  172. package/dist/hooks/lib/useSyncValues/useSyncValues.test.d.ts +1 -0
  173. package/dist/hooks/lib/useTrueOnce/useTrueOnce.test.d.ts +1 -0
  174. package/dist/jsonforms/cjs/MantineInputs/MantineFileInput.cjs +1 -1
  175. package/dist/jsonforms/cjs/complex/MantineTableControl/MantineTableControl.cjs +1 -1
  176. package/dist/jsonforms/cjs/hooks/useNavigationComponent.cjs +4 -4
  177. package/dist/jsonforms/cjs/hooks/useToolbarComponent.cjs +5 -5
  178. package/dist/jsonforms/cjs/layouts/Array/MantineArrayLayout.cjs +6 -6
  179. package/dist/jsonforms/cjs/layouts/Group/variants/GroupFieldset.cjs +4 -4
  180. package/dist/jsonforms/cjs/layouts/MantineHotizontalLayoutRenderer.cjs +2 -2
  181. package/dist/jsonforms/cjs/layouts/MantineVerticalLayoutRenderer.cjs +2 -2
  182. package/dist/jsonforms/cjs/testers/isJsonArrayControl.cjs +1 -1
  183. package/dist/jsonforms/esm/MantineInputs/MantineFileInput.mjs +1 -1
  184. package/dist/jsonforms/esm/complex/MantineTableControl/MantineTableControl.mjs +1 -1
  185. package/dist/jsonforms/esm/hooks/useNavigationComponent.mjs +1 -1
  186. package/dist/jsonforms/esm/hooks/useToolbarComponent.mjs +1 -1
  187. package/dist/jsonforms/esm/layouts/Array/MantineArrayLayout.mjs +1 -1
  188. package/dist/jsonforms/esm/layouts/Group/variants/GroupFieldset.mjs +1 -1
  189. package/dist/jsonforms/esm/layouts/MantineHotizontalLayoutRenderer.mjs +1 -1
  190. package/dist/jsonforms/esm/layouts/MantineVerticalLayoutRenderer.mjs +1 -1
  191. package/dist/jsonforms/esm/testers/isJsonArrayControl.mjs +1 -1
  192. package/dist/jsonforms/lib/JsonFormsWithCustomizer/JsonFormsWithCustomizer.test.d.ts +1 -0
  193. package/dist/jsonforms/lib/MantineInputs/MantineBooleanInput.test.d.ts +1 -0
  194. package/dist/jsonforms/lib/MantineInputs/MantineDateInput.test.d.ts +1 -0
  195. package/dist/jsonforms/lib/MantineInputs/MantineDateTimeInput.test.d.ts +1 -0
  196. package/dist/jsonforms/lib/MantineInputs/MantineEnumArrayInput.test.d.ts +1 -0
  197. package/dist/jsonforms/lib/MantineInputs/MantineEnumInput.test.d.ts +1 -0
  198. package/dist/jsonforms/lib/MantineInputs/MantineFileInput.test.d.ts +1 -0
  199. package/dist/jsonforms/lib/MantineInputs/MantineImageInput.test.d.ts +1 -0
  200. package/dist/jsonforms/lib/MantineInputs/MantineIntegerInput.test.d.ts +1 -0
  201. package/dist/jsonforms/lib/MantineInputs/MantineJsonInput.test.d.ts +1 -0
  202. package/dist/jsonforms/lib/MantineInputs/MantineNumberInput.test.d.ts +1 -0
  203. package/dist/jsonforms/lib/MantineInputs/MantineObjectInput.test.d.ts +1 -0
  204. package/dist/jsonforms/lib/MantineInputs/MantineOneOfEnumInput.test.d.ts +1 -0
  205. package/dist/jsonforms/lib/MantineInputs/MantineTextInput.test.d.ts +1 -0
  206. package/dist/jsonforms/lib/MantineInputs/MantineTimeInput.test.d.ts +1 -0
  207. package/dist/jsonforms/lib/complex/MantineArrayControl/MantineArrayControl.dispatch.test.d.ts +1 -0
  208. package/dist/jsonforms/lib/complex/MantineArrayControl/MantineArrayControl.test.d.ts +1 -0
  209. package/dist/jsonforms/lib/complex/MantineEnumArrayControl.dispatch.test.d.ts +1 -0
  210. package/dist/jsonforms/lib/complex/MantineEnumArrayControl.test.d.ts +1 -0
  211. package/dist/jsonforms/lib/complex/MantineObjectControl.dispatch.test.d.ts +1 -0
  212. package/dist/jsonforms/lib/complex/MantineObjectControl.test.d.ts +1 -0
  213. package/dist/jsonforms/lib/complex/MantineTableControl/MantineTableControl.test.d.ts +1 -0
  214. package/dist/jsonforms/lib/controls/MantineBooleanControl.test.d.ts +1 -0
  215. package/dist/jsonforms/lib/controls/MantineDateControl.test.d.ts +1 -0
  216. package/dist/jsonforms/lib/controls/MantineDateTimeControl.test.d.ts +1 -0
  217. package/dist/jsonforms/lib/controls/MantineEnumControl.test.d.ts +1 -0
  218. package/dist/jsonforms/lib/controls/MantineFileControl.test.d.ts +1 -0
  219. package/dist/jsonforms/lib/controls/MantineImageControl.test.d.ts +1 -0
  220. package/dist/jsonforms/lib/controls/MantineIntegerControl.test.d.ts +1 -0
  221. package/dist/jsonforms/lib/controls/MantineJsonControl.test.d.ts +1 -0
  222. package/dist/jsonforms/lib/controls/MantineNumberControl.test.d.ts +1 -0
  223. package/dist/jsonforms/lib/controls/MantineOneOfEnumControl.test.d.ts +1 -0
  224. package/dist/jsonforms/lib/controls/MantineTextControl.test.d.ts +1 -0
  225. package/dist/jsonforms/lib/controls/MantineTimeControl.test.d.ts +1 -0
  226. package/dist/jsonforms/lib/hooks/useThemeCustomizer.d.ts +6 -0
  227. package/dist/jsonforms/lib/hooks/useThemeCustomizer.test.d.ts +1 -0
  228. package/dist/jsonforms/lib/labels/MantineLabelRenderer.test.d.ts +1 -0
  229. package/dist/jsonforms/lib/layouts/Array/MantineArrayLayoutRenderer.dispatch.test.d.ts +1 -0
  230. package/dist/jsonforms/lib/layouts/Array/MantineArrayLayoutRenderer.test.d.ts +1 -0
  231. package/dist/jsonforms/lib/layouts/Categorization/MantineCategorizationLayoutRenderer.dispatch.test.d.ts +1 -0
  232. package/dist/jsonforms/lib/layouts/Categorization/MantineCategorizationLayoutRenderer.test.d.ts +1 -0
  233. package/dist/jsonforms/lib/layouts/Group/MantineGroupLayoutRenderer.dispatch.test.d.ts +1 -0
  234. package/dist/jsonforms/lib/layouts/Group/MantineGroupLayoutRenderer.test.d.ts +1 -0
  235. package/dist/jsonforms/lib/layouts/MantineHotizontalLayoutRenderer.dispatch.test.d.ts +1 -0
  236. package/dist/jsonforms/lib/layouts/MantineHotizontalLayoutRenderer.test.d.ts +1 -0
  237. package/dist/jsonforms/lib/layouts/MantineVerticalLayoutRenderer.dispatch.test.d.ts +1 -0
  238. package/dist/jsonforms/lib/layouts/MantineVerticalLayoutRenderer.test.d.ts +1 -0
  239. package/dist/jsonforms/lib/renderers/mantineCells.test.d.ts +1 -0
  240. package/dist/jsonforms/lib/renderers/mantineRenderers.test.d.ts +1 -0
  241. package/dist/jsonforms/lib/test-helpers/inputWrap.d.ts +167 -0
  242. package/dist/jsonforms/lib/test-helpers/jsonFormsWrap.d.ts +9 -0
  243. package/dist/jsonforms/lib/testers/isEnumArrayArrayControl.test.d.ts +1 -0
  244. package/dist/jsonforms/lib/testers/isEnumArrayControl.test.d.ts +1 -0
  245. package/dist/jsonforms/lib/testers/isFileControl.test.d.ts +1 -0
  246. package/dist/jsonforms/lib/testers/isFilesControl.test.d.ts +1 -0
  247. package/dist/jsonforms/lib/testers/isImageControl.test.d.ts +1 -0
  248. package/dist/jsonforms/lib/testers/isImagesControl.test.d.ts +1 -0
  249. package/dist/jsonforms/lib/testers/isJsonArrayControl.d.ts +6 -2
  250. package/dist/jsonforms/lib/testers/isJsonArrayControl.test.d.ts +1 -0
  251. package/dist/jsonforms/lib/testers/isJsonControl.test.d.ts +1 -0
  252. package/dist/jsonforms/lib/utils/getAbsoluteValue.test.d.ts +1 -0
  253. package/dist/jsonforms/lib/utils/isSchemaTypeInclude.test.d.ts +1 -0
  254. package/dist/jsonforms/lib/utils/layout.test.d.ts +1 -0
  255. package/dist/jsonforms/lib/utils/utcConverter.test.d.ts +1 -0
  256. package/dist/jsonforms/lib/utils/withAjvProps.test.d.ts +1 -0
  257. package/dist/jsonforms/lib/utils/withDebounce.test.d.ts +1 -0
  258. package/dist/jsonforms/lib/utils/withLabelMappingProps.test.d.ts +1 -0
  259. package/dist/utils/lib/FastAPIRTKLogger/FastAPIRTKLogger.test.d.ts +1 -0
  260. package/dist/utils/lib/Memoizer/MemoWrapper.test.d.ts +1 -0
  261. package/dist/utils/lib/Memoizer/RenderWrapper.test.d.ts +1 -0
  262. package/dist/utils/lib/convertId/convertId.test.d.ts +1 -0
  263. package/dist/utils/lib/convertToFormData/convertToFormData.test.d.ts +1 -0
  264. package/dist/utils/lib/createFetchParams/createFetchParams.test.d.ts +1 -0
  265. package/dist/utils/lib/createSafeContext/createSafeContext.test.d.ts +1 -0
  266. package/dist/utils/lib/deepMerge/deepMerge.test.d.ts +1 -0
  267. package/dist/utils/lib/getByPath/getByPath.test.d.ts +1 -0
  268. package/dist/utils/lib/getItemId/getItemId.test.d.ts +1 -0
  269. package/dist/utils/lib/getItemName/getItemName.test.d.ts +1 -0
  270. package/dist/utils/lib/getValue/getValue.test.d.ts +1 -0
  271. package/dist/utils/lib/getValueOrDefault/getValueOrDefault.test.d.ts +1 -0
  272. package/dist/utils/lib/isTruthy/isTruthy.test.d.ts +1 -0
  273. package/dist/utils/lib/mergeProps/mergeProps.test.d.ts +1 -0
  274. package/dist/utils/lib/parseFromValuesOrFunc/parseFromValuesOrFunc.test.d.ts +1 -0
  275. package/dist/utils/lib/parseResponse/parseResponse.test.d.ts +1 -0
  276. package/dist/utils/lib/parseValue/parseValue.test.d.ts +1 -0
  277. package/dist/utils/lib/urlJoin/urlJoin.test.d.ts +1 -0
  278. package/dist/utils/lib/useWatchRef/useWatchRef.test.d.ts +1 -0
  279. package/dist/zustand/lib/useProxy/useProxy.test.d.ts +1 -0
  280. package/dist/zustand/lib/utils/compareStateWithStore.test.d.ts +1 -0
  281. package/dist/zustand/lib/utils/createProxy.test.d.ts +1 -0
  282. package/package.json +24 -11
  283. package/dist/core/lib/Tables/NextGenDataGrid/hooks/useSize.d.ts +0 -20
  284. /package/dist/.external/cjs/{mantine-form-yup-resolver@2.0.0_@mantine_form@8.3.18_yup@1.7.1 → mantine-form-yup-resolver@2.0.0_@mantine_form@9.1.1_yup@1.7.1}/mantine-form-yup-resolver/dist/esm/index.cjs +0 -0
  285. /package/dist/.external/esm/{mantine-form-yup-resolver@2.0.0_@mantine_form@8.3.18_yup@1.7.1 → mantine-form-yup-resolver@2.0.0_@mantine_form@9.1.1_yup@1.7.1}/mantine-form-yup-resolver/dist/esm/index.mjs +0 -0
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const hooks = require("fastapi-rtk/hooks");
5
+ const core = require("@mantine/core");
6
+ const index_esm = require("../../../../../../.external/cjs/mantine-react-table@2.0.0-beta.9_@mantine_core@7.17.8_@mantine_dates@7.17.8_@mantine_hooks@7._2zjbhqlotlhjxtgwdmcgs6toey/mantine-react-table/dist/index.esm.cjs");
7
+ const React = require("react");
8
+ const BaseActionIcon = require("../../../../ActionIcons/utils/BaseActionIcon.cjs");
9
+ const DENSITY_NEXT = { md: "xs", xl: "md", xs: "xl" };
10
+ const ToggleGlobalFilterButton = React.memo(({ table, ...props }) => {
11
+ const { globalFilter, showGlobalFilter } = table.getState();
12
+ const { IconSearch, IconSearchOff } = table.options.icons;
13
+ return /* @__PURE__ */ jsxRuntime.jsx(
14
+ BaseActionIcon.BaseActionIcon,
15
+ {
16
+ Icon: showGlobalFilter ? IconSearchOff : IconSearch,
17
+ label: table.options.localization.showHideSearch,
18
+ disabled: !!globalFilter,
19
+ onClick: () => {
20
+ table.setShowGlobalFilter(!showGlobalFilter);
21
+ setTimeout(() => {
22
+ var _a;
23
+ return (_a = table.refs.searchInputRef.current) == null ? void 0 : _a.focus();
24
+ }, 100);
25
+ },
26
+ ...props
27
+ }
28
+ );
29
+ });
30
+ ToggleGlobalFilterButton.displayName = "ToggleGlobalFilterButton";
31
+ const ToggleFiltersButton = React.memo(({ table, ...props }) => {
32
+ const { showColumnFilters } = table.getState();
33
+ const { IconFilter, IconFilterOff } = table.options.icons;
34
+ return /* @__PURE__ */ jsxRuntime.jsx(
35
+ BaseActionIcon.BaseActionIcon,
36
+ {
37
+ Icon: showColumnFilters ? IconFilterOff : IconFilter,
38
+ label: table.options.localization.showHideFilters,
39
+ onClick: () => table.setShowColumnFilters((current) => !current),
40
+ ...props
41
+ }
42
+ );
43
+ });
44
+ ToggleFiltersButton.displayName = "ToggleFiltersButton";
45
+ const ToggleDensePaddingButton = React.memo(({ table, ...props }) => {
46
+ const { density } = table.getState();
47
+ const { IconBaselineDensityLarge, IconBaselineDensityMedium, IconBaselineDensitySmall } = table.options.icons;
48
+ const Icon = density === "xs" ? IconBaselineDensitySmall : density === "md" ? IconBaselineDensityMedium : IconBaselineDensityLarge;
49
+ return /* @__PURE__ */ jsxRuntime.jsx(
50
+ BaseActionIcon.BaseActionIcon,
51
+ {
52
+ Icon,
53
+ label: table.options.localization.toggleDensity,
54
+ onClick: () => table.setDensity((current) => DENSITY_NEXT[current]),
55
+ ...props
56
+ }
57
+ );
58
+ });
59
+ ToggleDensePaddingButton.displayName = "ToggleDensePaddingButton";
60
+ const ToggleFullScreenButton = React.memo(({ table, tooltipProps, ...props }) => {
61
+ const { isFullScreen } = table.getState();
62
+ const { IconMaximize, IconMinimize } = table.options.icons;
63
+ const [tooltipOpened, setTooltipOpened] = React.useState(false);
64
+ const label = table.options.localization.toggleFullScreen;
65
+ return /* @__PURE__ */ jsxRuntime.jsx(
66
+ BaseActionIcon.BaseActionIcon,
67
+ {
68
+ Icon: isFullScreen ? IconMinimize : IconMaximize,
69
+ label,
70
+ tooltipProps: { opened: tooltipOpened, ...tooltipProps },
71
+ onClick: () => {
72
+ setTooltipOpened(false);
73
+ table.setIsFullScreen((current) => !current);
74
+ },
75
+ onMouseEnter: () => setTooltipOpened(true),
76
+ onMouseLeave: () => setTooltipOpened(false),
77
+ ...props
78
+ }
79
+ );
80
+ });
81
+ ToggleFullScreenButton.displayName = "ToggleFullScreenButton";
82
+ const ShowHideColumnsButton = React.memo(({ table, tooltipProps, iconProps, ...props }) => {
83
+ const { IconColumns } = table.options.icons;
84
+ const label = table.options.localization.showHideColumns;
85
+ const actionIconProps = hooks.useActionIcon(props);
86
+ return /* @__PURE__ */ jsxRuntime.jsxs(core.Menu, { closeOnItemClick: false, withinPortal: true, children: [
87
+ /* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { withinPortal: true, ...tooltipProps, label: (tooltipProps == null ? void 0 : tooltipProps.label) ?? label, children: /* @__PURE__ */ jsxRuntime.jsx(core.Menu.Target, { children: /* @__PURE__ */ jsxRuntime.jsx(core.ActionIcon, { "aria-label": label, ...actionIconProps, children: /* @__PURE__ */ jsxRuntime.jsx(IconColumns, { ...iconProps }) }) }) }),
88
+ /* @__PURE__ */ jsxRuntime.jsx(index_esm.MRT_ShowHideColumnsMenu, { table })
89
+ ] });
90
+ });
91
+ ShowHideColumnsButton.displayName = "ShowHideColumnsButton";
92
+ exports.ShowHideColumnsButton = ShowHideColumnsButton;
93
+ exports.ToggleDensePaddingButton = ToggleDensePaddingButton;
94
+ exports.ToggleFiltersButton = ToggleFiltersButton;
95
+ exports.ToggleFullScreenButton = ToggleFullScreenButton;
96
+ exports.ToggleGlobalFilterButton = ToggleGlobalFilterButton;
@@ -38,7 +38,7 @@ const MRT_TableContainer = ({ table, ...rest }) => {
38
38
  const createModalOpen = createDisplayMode === "modal" && creatingRow;
39
39
  const editModalOpen = editDisplayMode === "modal" && editingRow;
40
40
  const tableContainerWrapperProps = utils.parseFromValuesOrFunc(mantineTableContainerWrapperProps, { table });
41
- const optimizations = table.refs.optimizations.current;
41
+ const optimizations = table.refs.optimizationsRef.current;
42
42
  return /* @__PURE__ */ jsxRuntime.jsxs(
43
43
  core.Box,
44
44
  {
@@ -42,7 +42,7 @@ const MRT_TableBodyRow = ({
42
42
  const visibleCells = row.getVisibleCells();
43
43
  const { virtualColumns, virtualPaddingLeft, virtualPaddingRight } = columnVirtualizer ?? {};
44
44
  const store = table.refs.selectionStoreRef.current;
45
- const optimizations = table.refs.optimizations.current;
45
+ const optimizations = table.refs.optimizationsRef.current;
46
46
  const isOptimizedRowSelected = zustand.useSelectionStore(store, (state) => state.rowSelection[row.id] ?? false);
47
47
  const isRowSelected = index_esm.getIsRowSelected({ row, table }) || isOptimizedRowSelected;
48
48
  const isRowPinned = enableRowPinning && row.getIsPinned();
@@ -31,7 +31,7 @@ const MRT_TableHead = ({ columnVirtualizer, table, ...rest }) => {
31
31
  } = table;
32
32
  const { rowSelection } = getState();
33
33
  const totalRowCount = rowCount ?? getPrePaginationRowModel().flatRows.length;
34
- const optimizations = table.refs.optimizations.current;
34
+ const optimizations = table.refs.optimizationsRef.current;
35
35
  const store = table.refs.selectionStoreRef.current;
36
36
  const optimizedRowSelection = zustand.useSelectionStore(store, (state) => state.rowSelection);
37
37
  const selectedRowCount = React.useMemo(
@@ -28,7 +28,7 @@ const MRT_ToolbarAlertBanner = ({ stackAlertBanner, table, ...rest }) => {
28
28
  }
29
29
  } = table;
30
30
  const { density, grouping, rowSelection, showAlertBanner } = getState();
31
- const optimizations = table.refs.optimizations.current;
31
+ const optimizations = table.refs.optimizationsRef.current;
32
32
  const store = table.refs.selectionStoreRef.current;
33
33
  const optimizedRowSelection = zustand.useSelectionStore(store, (state) => state.rowSelection);
34
34
  const optimizedSelectAllHandler = zustand.useSelectionStore(store, (state) => state.toggleAllRowsSelected);
@@ -92,41 +92,48 @@ const MRT_ToolbarAlertBanner = ({ stackAlertBanner, table, ...rest }) => {
92
92
  )
93
93
  ] }, `${index}-${columnId}`))
94
94
  ] }) : null;
95
- return /* @__PURE__ */ jsxRuntime.jsx(core.Collapse, { in: showAlertBanner || !!selectedAlert || !!groupedAlert, transitionDuration: stackAlertBanner ? 200 : 0, children: /* @__PURE__ */ jsxRuntime.jsx(
96
- core.Alert,
95
+ return /* @__PURE__ */ jsxRuntime.jsx(
96
+ core.Collapse,
97
97
  {
98
- color: "blue",
99
- icon: false,
100
- ...alertProps,
101
- className: clsx.clsx(
102
- MRT_ToolbarAlertBanner_module.default.alert,
103
- stackAlertBanner && !positionToolbarAlertBanner && MRT_ToolbarAlertBanner_module.default["alert-stacked"],
104
- !stackAlertBanner && positionToolbarAlertBanner === "bottom" && MRT_ToolbarAlertBanner_module.default["alert-bottom"],
105
- alertProps == null ? void 0 : alertProps.className
106
- ),
107
- children: (renderToolbarAlertBannerContent == null ? void 0 : renderToolbarAlertBannerContent({
108
- groupedAlert,
109
- selectedAlert,
110
- table
111
- })) ?? /* @__PURE__ */ jsxRuntime.jsxs(
112
- core.Flex,
98
+ expanded: showAlertBanner || !!selectedAlert || !!groupedAlert,
99
+ transitionDuration: stackAlertBanner ? 200 : 0,
100
+ children: /* @__PURE__ */ jsxRuntime.jsx(
101
+ core.Alert,
113
102
  {
103
+ color: "blue",
104
+ icon: false,
105
+ ...alertProps,
114
106
  className: clsx.clsx(
115
- MRT_ToolbarAlertBanner_module.default["toolbar-alert"],
116
- positionToolbarAlertBanner === "head-overlay" && MRT_ToolbarAlertBanner_module.default["head-overlay"],
117
- density
107
+ MRT_ToolbarAlertBanner_module.default.alert,
108
+ stackAlertBanner && !positionToolbarAlertBanner && MRT_ToolbarAlertBanner_module.default["alert-stacked"],
109
+ !stackAlertBanner && positionToolbarAlertBanner === "bottom" && MRT_ToolbarAlertBanner_module.default["alert-bottom"],
110
+ alertProps == null ? void 0 : alertProps.className
118
111
  ),
119
- children: [
120
- enableRowSelection && enableSelectAll && positionToolbarAlertBanner === "head-overlay" && /* @__PURE__ */ jsxRuntime.jsx(index_esm.MRT_SelectCheckbox, { table }),
121
- /* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { children: [
122
- alertProps == null ? void 0 : alertProps.children,
123
- selectedAlert,
124
- groupedAlert
125
- ] })
126
- ]
112
+ children: (renderToolbarAlertBannerContent == null ? void 0 : renderToolbarAlertBannerContent({
113
+ groupedAlert,
114
+ selectedAlert,
115
+ table
116
+ })) ?? /* @__PURE__ */ jsxRuntime.jsxs(
117
+ core.Flex,
118
+ {
119
+ className: clsx.clsx(
120
+ MRT_ToolbarAlertBanner_module.default["toolbar-alert"],
121
+ positionToolbarAlertBanner === "head-overlay" && MRT_ToolbarAlertBanner_module.default["head-overlay"],
122
+ density
123
+ ),
124
+ children: [
125
+ enableRowSelection && enableSelectAll && positionToolbarAlertBanner === "head-overlay" && /* @__PURE__ */ jsxRuntime.jsx(index_esm.MRT_SelectCheckbox, { table }),
126
+ /* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { children: [
127
+ alertProps == null ? void 0 : alertProps.children,
128
+ selectedAlert,
129
+ groupedAlert
130
+ ] })
131
+ ]
132
+ }
133
+ )
127
134
  }
128
135
  )
129
136
  }
130
- ) });
137
+ );
131
138
  };
132
139
  exports.MRT_ToolbarAlertBanner = MRT_ToolbarAlertBanner;
@@ -26,7 +26,6 @@ function ApiProvider({
26
26
  infoQueryProps,
27
27
  dataQueryProps,
28
28
  streamingQueryProps,
29
- throwOnError,
30
29
  streaming,
31
30
  children
32
31
  }) {
@@ -46,7 +45,6 @@ function ApiProvider({
46
45
  infoQueryProps,
47
46
  dataQueryProps,
48
47
  streamingQueryProps,
49
- throwOnError,
50
48
  streaming
51
49
  },
52
50
  apiParams
@@ -56,7 +56,6 @@ function useProvideApi({
56
56
  infoQueryProps,
57
57
  dataQueryProps,
58
58
  streamingQueryProps,
59
- throwOnError = false,
60
59
  streaming: streamingMode = false
61
60
  }, api = defaultApi) {
62
61
  var _a;
@@ -223,10 +222,7 @@ function useProvideApi({
223
222
  pathRef,
224
223
  infoRef,
225
224
  queryParamsRef,
226
- currentLanguage,
227
- resetError,
228
- setError,
229
- throwOnError
225
+ currentLanguage
230
226
  });
231
227
  const specialKey = React.useMemo(() => {
232
228
  var _a2, _b;
@@ -273,6 +269,7 @@ function useProvideApi({
273
269
  upload,
274
270
  getFileURL: (item) => getItemURL("file", item),
275
271
  getImageURL: (item) => getItemURL("image", item),
272
+ setError,
276
273
  resetError
277
274
  };
278
275
  }
@@ -2,117 +2,46 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const utils = require("fastapi-rtk/utils");
4
4
  const React = require("react");
5
- const useApiActions = ({
6
- api,
7
- path,
8
- pathRef,
9
- infoRef,
10
- queryParamsRef,
11
- currentLanguage,
12
- resetError,
13
- setError,
14
- throwOnError
15
- }) => {
5
+ const useApiActions = ({ api, path, pathRef, infoRef, queryParamsRef, currentLanguage }) => {
16
6
  const getEntry = React.useCallback(
17
- async (id) => {
18
- try {
19
- resetError();
20
- const response = await api.getItem(pathRef.current, utils.convertId(id), {
21
- headers: { "Accept-Language": currentLanguage }
22
- });
23
- return response;
24
- } catch (error) {
25
- setError({ message: "Could not fetch item with id {{id}}", data: { id }, originalError: error });
26
- if (throwOnError) {
27
- throw error;
28
- }
29
- }
30
- },
31
- [api, currentLanguage, pathRef, resetError, setError, throwOnError]
7
+ async (id) => api.getItem(pathRef.current, utils.convertId(id), {
8
+ headers: { "Accept-Language": currentLanguage }
9
+ }),
10
+ [api, currentLanguage, pathRef]
32
11
  );
33
12
  const addEntry = React.useCallback(
34
13
  async (item) => {
35
14
  var _a;
36
- try {
37
- resetError();
38
- const func = ((_a = infoRef.current) == null ? void 0 : _a.add_type) === "form" ? api.formCreateItem : api.createItem;
39
- const response = await func(pathRef.current, item, {
40
- headers: { "Accept-Language": currentLanguage }
41
- });
42
- return response;
43
- } catch (error) {
44
- setError({ message: `Could not add item`, originalError: error });
45
- if (throwOnError) {
46
- throw error;
47
- }
48
- }
15
+ const func = ((_a = infoRef.current) == null ? void 0 : _a.add_type) === "form" ? api.formCreateItem : api.createItem;
16
+ return func(pathRef.current, item, {
17
+ headers: { "Accept-Language": currentLanguage }
18
+ });
49
19
  },
50
- [api.createItem, api.formCreateItem, currentLanguage, infoRef, pathRef, resetError, setError, throwOnError]
20
+ [api.createItem, api.formCreateItem, currentLanguage, infoRef, pathRef]
51
21
  );
52
22
  const updateEntry = React.useCallback(
53
23
  async (id, item) => {
54
24
  var _a;
55
- try {
56
- resetError();
57
- const func = ((_a = infoRef.current) == null ? void 0 : _a.edit_type) === "form" ? api.formUpdateItem : api.updateItem;
58
- const response = await func(pathRef.current, utils.convertId(id), item, {
59
- headers: { "Accept-Language": currentLanguage }
60
- });
61
- return response;
62
- } catch (error) {
63
- setError({ message: "Could not update item with id {{id}}", data: { id }, originalError: error });
64
- if (throwOnError) {
65
- throw error;
66
- }
67
- }
25
+ const func = ((_a = infoRef.current) == null ? void 0 : _a.edit_type) === "form" ? api.formUpdateItem : api.updateItem;
26
+ return func(pathRef.current, utils.convertId(id), item, {
27
+ headers: { "Accept-Language": currentLanguage }
28
+ });
68
29
  },
69
- [api.formUpdateItem, api.updateItem, currentLanguage, infoRef, pathRef, resetError, setError, throwOnError]
30
+ [api.formUpdateItem, api.updateItem, currentLanguage, infoRef, pathRef]
70
31
  );
71
32
  const deleteEntry = React.useCallback(
72
- async (id) => {
73
- try {
74
- resetError();
75
- const response = await api.deleteItem(pathRef.current, utils.convertId(id), {
76
- headers: { "Accept-Language": currentLanguage }
77
- });
78
- return response;
79
- } catch (error) {
80
- setError({ message: "Could not delete item with id {{id}}", data: { id }, originalError: error });
81
- if (throwOnError) {
82
- throw error;
83
- }
84
- }
85
- },
86
- [api, currentLanguage, pathRef, resetError, setError, throwOnError]
33
+ async (id) => api.deleteItem(pathRef.current, utils.convertId(id), {
34
+ headers: { "Accept-Language": currentLanguage }
35
+ }),
36
+ [api, currentLanguage, pathRef]
87
37
  );
88
38
  const download = React.useCallback(
89
- async (label, { export_mode, delimiter, quotechar } = {}) => {
90
- try {
91
- resetError();
92
- await api.downloadItems(pathRef.current, queryParamsRef.current, { label, export_mode, delimiter, quotechar });
93
- } catch (error) {
94
- setError({ message: `Could not download`, originalError: error });
95
- if (throwOnError) {
96
- throw error;
97
- }
98
- }
99
- },
100
- [api, pathRef, queryParamsRef, resetError, setError, throwOnError]
39
+ async (label, { export_mode, delimiter, quotechar } = {}) => api.downloadItems(pathRef.current, queryParamsRef.current, { label, export_mode, delimiter, quotechar }),
40
+ [api, pathRef, queryParamsRef]
101
41
  );
102
42
  const upload = React.useCallback(
103
- async (file, { delimiter, quotechar } = {}) => {
104
- try {
105
- resetError();
106
- const response = await api.uploadItems(pathRef.current, file, { delimiter, quotechar });
107
- return response;
108
- } catch (error) {
109
- setError({ message: `Could not upload`, originalError: error });
110
- if (throwOnError) {
111
- throw error;
112
- }
113
- }
114
- },
115
- [api, pathRef, resetError, setError, throwOnError]
43
+ async (file, { delimiter, quotechar } = {}) => api.uploadItems(pathRef.current, file, { delimiter, quotechar }),
44
+ [api, pathRef]
116
45
  );
117
46
  const getItemURL = React.useCallback(
118
47
  (type, item) => typeof item === "string" ? utils.urlJoin(path, `_${type}`, item) : URL.createObjectURL(item),
@@ -1,16 +1,14 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { useActionIcon } from "fastapi-rtk/hooks";
3
- import { Tooltip, ActionIcon } from "@mantine/core";
4
2
  import { memo } from "react";
5
3
  import ForwardRef from "../../_virtual/plus.mjs";
6
4
  import { useForms } from "../../hooks/api/useForms.mjs";
7
5
  import "../../Wrappers/Provider/Contexts/LangContext.mjs";
6
+ import { BaseActionIcon } from "../utils/BaseActionIcon.mjs";
8
7
  import { useTranslation } from "../../../../.external/esm/react-i18next@15.7.4_i18next@25.10.10_react-dom@19.2.6_react@19.2.6_typescript@5.9.3/react-i18next/dist/es/useTranslation.mjs";
9
- const Add = memo(({ tooltipProps, iconProps, ...props }) => {
8
+ const Add = memo((props) => {
10
9
  const { t } = useTranslation();
11
10
  const { setOpened } = useForms("add");
12
- const actionIconProps = useActionIcon({ onClick: () => setOpened(true), ...props });
13
- return /* @__PURE__ */ jsx(Tooltip, { ...tooltipProps, label: (tooltipProps == null ? void 0 : tooltipProps.label) ?? t("Add Item"), children: /* @__PURE__ */ jsx(ActionIcon, { ...actionIconProps, children: /* @__PURE__ */ jsx(ForwardRef, { ...iconProps }) }) });
11
+ return /* @__PURE__ */ jsx(BaseActionIcon, { Icon: ForwardRef, label: t("Add Item"), onClick: () => setOpened(true), ...props });
14
12
  });
15
13
  Add.displayName = "Add";
16
14
  export {
@@ -1,24 +1,27 @@
1
- import { jsx, Fragment } from "react/jsx-runtime";
2
- import { useActionIcon } from "fastapi-rtk/hooks";
3
- import { Tooltip, ActionIcon } from "@mantine/core";
1
+ import { jsx } from "react/jsx-runtime";
4
2
  import { memo } from "react";
5
3
  import ForwardRef from "../../_virtual/trash.mjs";
6
4
  import { useForms } from "../../hooks/api/useForms.mjs";
7
5
  import "../../Wrappers/Provider/Contexts/LangContext.mjs";
6
+ import { BaseActionIcon } from "../utils/BaseActionIcon.mjs";
8
7
  import { useTranslation } from "../../../../.external/esm/react-i18next@15.7.4_i18next@25.10.10_react-dom@19.2.6_react@19.2.6_typescript@5.9.3/react-i18next/dist/es/useTranslation.mjs";
9
- const Delete = memo(({ id, iconProps, ...props }) => {
8
+ const Delete = memo(({ id, ...props }) => {
10
9
  const { t } = useTranslation();
11
10
  const { setOpened, setItem } = useForms("delete");
12
- const actionIconProps = useActionIcon({
13
- onClick: (e) => {
14
- e == null ? void 0 : e.stopPropagation();
15
- setItem(id);
16
- setOpened(true);
17
- },
18
- size: "sm",
19
- ...props
20
- });
21
- return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Tooltip, { label: t("Delete"), children: /* @__PURE__ */ jsx(ActionIcon, { ...actionIconProps, children: /* @__PURE__ */ jsx(ForwardRef, { ...iconProps }) }) }) });
11
+ return /* @__PURE__ */ jsx(
12
+ BaseActionIcon,
13
+ {
14
+ Icon: ForwardRef,
15
+ label: t("Delete"),
16
+ size: "sm",
17
+ onClick: (e) => {
18
+ e == null ? void 0 : e.stopPropagation();
19
+ setItem(id);
20
+ setOpened(true);
21
+ },
22
+ ...props
23
+ }
24
+ );
22
25
  });
23
26
  Delete.displayName = "Delete";
24
27
  export {
@@ -1,27 +1,25 @@
1
1
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { DEBOUNCE_LOADING_DELAY, DEFAULT_DELIMITER, DELIMITER_DATA } from "fastapi-rtk/constants";
3
- import { useActionIcon } from "fastapi-rtk/hooks";
4
- import { Modal, Stack, Select, Group, Button, ThemeIcon, Loader, Tooltip, ActionIcon } from "@mantine/core";
3
+ import { Modal, Stack, Select, Group, Button } from "@mantine/core";
5
4
  import { useDisclosure, useDebouncedState } from "@mantine/hooks";
6
5
  import { memo, useState } from "react";
7
6
  import ForwardRef$1 from "../../_virtual/download.mjs";
8
7
  import ForwardRef from "../../_virtual/separator-vertical.mjs";
9
8
  import { useApi } from "../../hooks/api/useApi.mjs";
10
9
  import "../../Wrappers/Provider/Contexts/LangContext.mjs";
10
+ import { BaseActionIcon } from "../utils/BaseActionIcon.mjs";
11
11
  import { useTranslation } from "../../../../.external/esm/react-i18next@15.7.4_i18next@25.10.10_react-dom@19.2.6_react@19.2.6_typescript@5.9.3/react-i18next/dist/es/useTranslation.mjs";
12
- const Download = memo(({ tooltipProps, iconProps, ...props }) => {
13
- const { download } = useApi();
12
+ const Download = memo((props) => {
13
+ const { download, setError, resetError } = useApi();
14
14
  const { t } = useTranslation();
15
15
  const [opened, { toggle, close }] = useDisclosure();
16
16
  const [loading, setLoading] = useDebouncedState(false, DEBOUNCE_LOADING_DELAY);
17
17
  const [delimiter, setDelimiter] = useState(DEFAULT_DELIMITER);
18
- const actionIconProps = useActionIcon({
19
- onClick: toggle,
20
- ...props
21
- });
22
18
  const onDownload = () => {
23
19
  setLoading(true);
24
- download(void 0, { delimiter }).catch(() => {
20
+ resetError();
21
+ download(void 0, { delimiter }).catch((error) => {
22
+ setError({ message: "Could not download", originalError: error });
25
23
  }).finally(() => {
26
24
  setLoading(false);
27
25
  close();
@@ -44,7 +42,7 @@ const Download = memo(({ tooltipProps, iconProps, ...props }) => {
44
42
  ),
45
43
  /* @__PURE__ */ jsx(Group, { justify: "end", children: /* @__PURE__ */ jsx(Button, { mt: "md", onClick: onDownload, loading, children: "Download" }) })
46
44
  ] }) }),
47
- loading ? /* @__PURE__ */ jsx(ThemeIcon, { variant: "transparent", size: actionIconProps.size, c: actionIconProps.c, children: /* @__PURE__ */ jsx(Loader, { size: "100%", color: actionIconProps.c }) }) : /* @__PURE__ */ jsx(Tooltip, { ...tooltipProps, label: (tooltipProps == null ? void 0 : tooltipProps.label) ?? t("Download"), children: /* @__PURE__ */ jsx(ActionIcon, { ...actionIconProps, children: /* @__PURE__ */ jsx(ForwardRef$1, { ...iconProps }) }) })
45
+ /* @__PURE__ */ jsx(BaseActionIcon, { Icon: ForwardRef$1, label: t("Download"), loading, onClick: toggle, ...props })
48
46
  ] });
49
47
  });
50
48
  Download.displayName = "Download";
@@ -1,35 +1,38 @@
1
- import { jsx, Fragment } from "react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { DEBOUNCE_LOADING_DELAY } from "fastapi-rtk/constants";
3
- import { useActionIcon } from "fastapi-rtk/hooks";
4
- import { Tooltip, ActionIcon } from "@mantine/core";
5
3
  import { useDebouncedState } from "@mantine/hooks";
6
4
  import { memo } from "react";
7
5
  import ForwardRef from "../../_virtual/pencil.mjs";
8
6
  import { useApi } from "../../hooks/api/useApi.mjs";
9
7
  import { useForms } from "../../hooks/api/useForms.mjs";
10
8
  import "../../Wrappers/Provider/Contexts/LangContext.mjs";
9
+ import { BaseActionIcon } from "../utils/BaseActionIcon.mjs";
11
10
  import { useTranslation } from "../../../../.external/esm/react-i18next@15.7.4_i18next@25.10.10_react-dom@19.2.6_react@19.2.6_typescript@5.9.3/react-i18next/dist/es/useTranslation.mjs";
12
- const Edit = memo(({ id, iconProps, ...props }) => {
13
- const { getEntry } = useApi();
11
+ const Edit = memo(({ id, ...props }) => {
12
+ const { getEntry, setError, resetError } = useApi();
14
13
  const { t } = useTranslation();
15
14
  const { setOpened, setItem } = useForms("edit");
16
15
  const [loading, setLoading] = useDebouncedState(false, DEBOUNCE_LOADING_DELAY);
17
- const actionIconProps = useActionIcon({
18
- onClick: () => {
19
- setLoading(true);
20
- getEntry(id).then((entry) => {
21
- if (entry) {
16
+ return /* @__PURE__ */ jsx(
17
+ BaseActionIcon,
18
+ {
19
+ Icon: ForwardRef,
20
+ label: t("Edit"),
21
+ size: "sm",
22
+ loading,
23
+ onClick: () => {
24
+ setLoading(true);
25
+ resetError();
26
+ getEntry(id).then((entry) => {
22
27
  setItem(entry);
23
28
  setOpened(true);
24
- }
25
- }).catch(() => {
26
- }).finally(() => setLoading(false));
27
- },
28
- size: "sm",
29
- loading,
30
- ...props
31
- });
32
- return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Tooltip, { label: t("Edit"), children: /* @__PURE__ */ jsx(ActionIcon, { ...actionIconProps, children: /* @__PURE__ */ jsx(ForwardRef, { ...iconProps }) }) }) });
29
+ }).catch((error) => {
30
+ setError({ message: "Could not fetch item with id {{id}}", data: { id }, originalError: error });
31
+ }).finally(() => setLoading(false));
32
+ },
33
+ ...props
34
+ }
35
+ );
33
36
  });
34
37
  Edit.displayName = "Edit";
35
38
  export {
@@ -1,25 +1,27 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { useActionIcon } from "fastapi-rtk/hooks";
3
- import { ThemeIcon, Loader, Tooltip, ActionIcon } from "@mantine/core";
4
2
  import { memo, useState } from "react";
5
3
  import ForwardRef from "../../_virtual/refresh.mjs";
6
4
  import { useApi } from "../../hooks/api/useApi.mjs";
7
5
  import "../../Wrappers/Provider/Contexts/LangContext.mjs";
6
+ import { BaseActionIcon } from "../utils/BaseActionIcon.mjs";
8
7
  import { useTranslation } from "../../../../.external/esm/react-i18next@15.7.4_i18next@25.10.10_react-dom@19.2.6_react@19.2.6_typescript@5.9.3/react-i18next/dist/es/useTranslation.mjs";
9
- const Refresh = memo(({ tooltipProps, iconProps, ...props }) => {
8
+ const Refresh = memo((props) => {
10
9
  const { t } = useTranslation();
11
10
  const [loading, setLoading] = useState(false);
12
11
  const { refetch } = useApi();
13
- const actionIconProps = useActionIcon({
14
- onClick: () => {
15
- setLoading(true);
16
- refetch().finally(() => {
17
- setLoading(false);
18
- });
19
- },
20
- ...props
21
- });
22
- return loading ? /* @__PURE__ */ jsx(ThemeIcon, { variant: "transparent", size: actionIconProps.size, c: actionIconProps.c, children: /* @__PURE__ */ jsx(Loader, { size: "100%", color: actionIconProps.c }) }) : /* @__PURE__ */ jsx(Tooltip, { ...tooltipProps, label: (tooltipProps == null ? void 0 : tooltipProps.refresh) ?? t("Refresh"), children: /* @__PURE__ */ jsx(ActionIcon, { ...actionIconProps, children: /* @__PURE__ */ jsx(ForwardRef, { ...iconProps }) }) });
12
+ return /* @__PURE__ */ jsx(
13
+ BaseActionIcon,
14
+ {
15
+ Icon: ForwardRef,
16
+ label: t("Refresh"),
17
+ loading,
18
+ onClick: () => {
19
+ setLoading(true);
20
+ refetch().finally(() => setLoading(false));
21
+ },
22
+ ...props
23
+ }
24
+ );
23
25
  });
24
26
  Refresh.displayName = "Refresh";
25
27
  export {