@refinedev/core 4.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.
- package/CHANGELOG.md +2577 -0
- package/README.md +257 -0
- package/dist/components/authenticated/index.d.ts +41 -0
- package/dist/components/authenticated/index.d.ts.map +1 -0
- package/dist/components/canAccess/index.d.ts +11 -0
- package/dist/components/canAccess/index.d.ts.map +1 -0
- package/dist/components/containers/index.d.ts +2 -0
- package/dist/components/containers/index.d.ts.map +1 -0
- package/dist/components/containers/refine/index.d.ts +144 -0
- package/dist/components/containers/refine/index.d.ts.map +1 -0
- package/dist/components/gh-banner/index.d.ts +3 -0
- package/dist/components/gh-banner/index.d.ts.map +1 -0
- package/dist/components/gh-banner/styles.d.ts +2 -0
- package/dist/components/gh-banner/styles.d.ts.map +1 -0
- package/dist/components/index.d.ts +9 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/layoutWrapper/defaultLayout/index.d.ts +4 -0
- package/dist/components/layoutWrapper/defaultLayout/index.d.ts.map +1 -0
- package/dist/components/layoutWrapper/index.d.ts +46 -0
- package/dist/components/layoutWrapper/index.d.ts.map +1 -0
- package/dist/components/pages/auth/components/forgotPassword/index.d.ts +7 -0
- package/dist/components/pages/auth/components/forgotPassword/index.d.ts.map +1 -0
- package/dist/components/pages/auth/components/index.d.ts +5 -0
- package/dist/components/pages/auth/components/index.d.ts.map +1 -0
- package/dist/components/pages/auth/components/login/index.d.ts +7 -0
- package/dist/components/pages/auth/components/login/index.d.ts.map +1 -0
- package/dist/components/pages/auth/components/register/index.d.ts +7 -0
- package/dist/components/pages/auth/components/register/index.d.ts.map +1 -0
- package/dist/components/pages/auth/components/updatePassword/index.d.ts +7 -0
- package/dist/components/pages/auth/components/updatePassword/index.d.ts.map +1 -0
- package/dist/components/pages/auth/index.d.ts +12 -0
- package/dist/components/pages/auth/index.d.ts.map +1 -0
- package/dist/components/pages/error/index.d.ts +9 -0
- package/dist/components/pages/error/index.d.ts.map +1 -0
- package/dist/components/pages/index.d.ts +7 -0
- package/dist/components/pages/index.d.ts.map +1 -0
- package/dist/components/pages/login/index.d.ts +13 -0
- package/dist/components/pages/login/index.d.ts.map +1 -0
- package/dist/components/pages/ready/index.d.ts +9 -0
- package/dist/components/pages/ready/index.d.ts.map +1 -0
- package/dist/components/pages/welcome/index.d.ts +6 -0
- package/dist/components/pages/welcome/index.d.ts.map +1 -0
- package/dist/components/routeChangeHandler/index.d.ts +3 -0
- package/dist/components/routeChangeHandler/index.d.ts.map +1 -0
- package/dist/components/telemetry/index.d.ts +3 -0
- package/dist/components/telemetry/index.d.ts.map +1 -0
- package/dist/components/undoableQueue/index.d.ts +6 -0
- package/dist/components/undoableQueue/index.d.ts.map +1 -0
- package/dist/contexts/accessControl/IAccessControlContext.d.ts +31 -0
- package/dist/contexts/accessControl/IAccessControlContext.d.ts.map +1 -0
- package/dist/contexts/accessControl/index.d.ts +9 -0
- package/dist/contexts/accessControl/index.d.ts.map +1 -0
- package/dist/contexts/auditLog/IAuditLogContext.d.ts +29 -0
- package/dist/contexts/auditLog/IAuditLogContext.d.ts.map +1 -0
- package/dist/contexts/auditLog/index.d.ts +7 -0
- package/dist/contexts/auditLog/index.d.ts.map +1 -0
- package/dist/contexts/auth/IAuthContext.d.ts +26 -0
- package/dist/contexts/auth/IAuthContext.d.ts.map +1 -0
- package/dist/contexts/auth/index.d.ts +20 -0
- package/dist/contexts/auth/index.d.ts.map +1 -0
- package/dist/contexts/data/IDataContext.d.ts +193 -0
- package/dist/contexts/data/IDataContext.d.ts.map +1 -0
- package/dist/contexts/data/index.d.ts +52 -0
- package/dist/contexts/data/index.d.ts.map +1 -0
- package/dist/contexts/legacy-router/IRouterContext.d.ts +35 -0
- package/dist/contexts/legacy-router/IRouterContext.d.ts.map +1 -0
- package/dist/contexts/legacy-router/index.d.ts +9 -0
- package/dist/contexts/legacy-router/index.d.ts.map +1 -0
- package/dist/contexts/live/ILiveContext.d.ts +39 -0
- package/dist/contexts/live/ILiveContext.d.ts.map +1 -0
- package/dist/contexts/live/index.d.ts +5 -0
- package/dist/contexts/live/index.d.ts.map +1 -0
- package/dist/contexts/notification/INotificationContext.d.ts +14 -0
- package/dist/contexts/notification/INotificationContext.d.ts.map +1 -0
- package/dist/contexts/notification/index.d.ts +9 -0
- package/dist/contexts/notification/index.d.ts.map +1 -0
- package/dist/contexts/refine/IRefineContext.d.ts +106 -0
- package/dist/contexts/refine/IRefineContext.d.ts.map +1 -0
- package/dist/contexts/refine/index.d.ts +6 -0
- package/dist/contexts/refine/index.d.ts.map +1 -0
- package/dist/contexts/resource/IResourceContext.d.ts +49 -0
- package/dist/contexts/resource/IResourceContext.d.ts.map +1 -0
- package/dist/contexts/resource/index.d.ts +9 -0
- package/dist/contexts/resource/index.d.ts.map +1 -0
- package/dist/contexts/router/index.d.ts +7 -0
- package/dist/contexts/router/index.d.ts.map +1 -0
- package/dist/contexts/router-picker/index.d.ts +15 -0
- package/dist/contexts/router-picker/index.d.ts.map +1 -0
- package/dist/contexts/translation/ITranslationContext.d.ts +11 -0
- package/dist/contexts/translation/ITranslationContext.d.ts.map +1 -0
- package/dist/contexts/translation/index.d.ts +9 -0
- package/dist/contexts/translation/index.d.ts.map +1 -0
- package/dist/contexts/undoableQueue/IUndoableQueueContext.d.ts +7 -0
- package/dist/contexts/undoableQueue/IUndoableQueueContext.d.ts.map +1 -0
- package/dist/contexts/undoableQueue/actionTypes.d.ts +6 -0
- package/dist/contexts/undoableQueue/actionTypes.d.ts.map +1 -0
- package/dist/contexts/undoableQueue/index.d.ts +3 -0
- package/dist/contexts/undoableQueue/index.d.ts.map +1 -0
- package/dist/contexts/undoableQueue/undoableQueueContext.d.ts +8 -0
- package/dist/contexts/undoableQueue/undoableQueueContext.d.ts.map +1 -0
- package/dist/contexts/unsavedWarn/IUnsavedWarnContext.d.ts +5 -0
- package/dist/contexts/unsavedWarn/IUnsavedWarnContext.d.ts.map +1 -0
- package/dist/contexts/unsavedWarn/index.d.ts +7 -0
- package/dist/contexts/unsavedWarn/index.d.ts.map +1 -0
- package/dist/definitions/helpers/check-router-prop-misuse/index.d.ts +3 -0
- package/dist/definitions/helpers/check-router-prop-misuse/index.d.ts.map +1 -0
- package/dist/definitions/helpers/handleMultiple/index.d.ts +6 -0
- package/dist/definitions/helpers/handleMultiple/index.d.ts.map +1 -0
- package/dist/definitions/helpers/handlePaginationParams/index.d.ts +9 -0
- package/dist/definitions/helpers/handlePaginationParams/index.d.ts.map +1 -0
- package/dist/definitions/helpers/handleRefineOptions/index.d.ts +26 -0
- package/dist/definitions/helpers/handleRefineOptions/index.d.ts.map +1 -0
- package/dist/definitions/helpers/handleUseParams/index.d.ts +2 -0
- package/dist/definitions/helpers/handleUseParams/index.d.ts.map +1 -0
- package/dist/definitions/helpers/hasPermission/index.d.ts +2 -0
- package/dist/definitions/helpers/hasPermission/index.d.ts.map +1 -0
- package/dist/definitions/helpers/humanizeString/index.d.ts +2 -0
- package/dist/definitions/helpers/humanizeString/index.d.ts.map +1 -0
- package/dist/definitions/helpers/importCSVMapper/index.d.ts +3 -0
- package/dist/definitions/helpers/importCSVMapper/index.d.ts.map +1 -0
- package/dist/definitions/helpers/index.d.ts +23 -0
- package/dist/definitions/helpers/index.d.ts.map +1 -0
- package/dist/definitions/helpers/legacy-resource-transform/index.d.ts +9 -0
- package/dist/definitions/helpers/legacy-resource-transform/index.d.ts.map +1 -0
- package/dist/definitions/helpers/menu/create-resource-key.d.ts +3 -0
- package/dist/definitions/helpers/menu/create-resource-key.d.ts.map +1 -0
- package/dist/definitions/helpers/menu/create-tree.d.ts +13 -0
- package/dist/definitions/helpers/menu/create-tree.d.ts.map +1 -0
- package/dist/definitions/helpers/pick-resource/index.d.ts +8 -0
- package/dist/definitions/helpers/pick-resource/index.d.ts.map +1 -0
- package/dist/definitions/helpers/pickDataProvider/index.d.ts +6 -0
- package/dist/definitions/helpers/pickDataProvider/index.d.ts.map +1 -0
- package/dist/definitions/helpers/pickNotDeprecated/index.d.ts +2 -0
- package/dist/definitions/helpers/pickNotDeprecated/index.d.ts.map +1 -0
- package/dist/definitions/helpers/queryKeys/index.d.ts +4 -0
- package/dist/definitions/helpers/queryKeys/index.d.ts.map +1 -0
- package/dist/definitions/helpers/redirectPage/index.d.ts +9 -0
- package/dist/definitions/helpers/redirectPage/index.d.ts.map +1 -0
- package/dist/definitions/helpers/routeGenerator/index.d.ts +7 -0
- package/dist/definitions/helpers/routeGenerator/index.d.ts.map +1 -0
- package/dist/definitions/helpers/router/__tests__/check-by-segments.d.ts +2 -0
- package/dist/definitions/helpers/router/__tests__/check-by-segments.d.ts.map +1 -0
- package/dist/definitions/helpers/router/__tests__/compose-route.d.ts +2 -0
- package/dist/definitions/helpers/router/__tests__/compose-route.d.ts.map +1 -0
- package/dist/definitions/helpers/router/__tests__/get-action-routes-from-resource.d.ts +2 -0
- package/dist/definitions/helpers/router/__tests__/get-action-routes-from-resource.d.ts.map +1 -0
- package/dist/definitions/helpers/router/__tests__/get-default-action-path.d.ts +2 -0
- package/dist/definitions/helpers/router/__tests__/get-default-action-path.d.ts.map +1 -0
- package/dist/definitions/helpers/router/__tests__/get-parent-prefix-for-resource.d.ts +2 -0
- package/dist/definitions/helpers/router/__tests__/get-parent-prefix-for-resource.d.ts.map +1 -0
- package/dist/definitions/helpers/router/__tests__/get-parent-resource.d.ts +2 -0
- package/dist/definitions/helpers/router/__tests__/get-parent-resource.d.ts.map +1 -0
- package/dist/definitions/helpers/router/__tests__/is-segment-counts-same.d.ts +2 -0
- package/dist/definitions/helpers/router/__tests__/is-segment-counts-same.d.ts.map +1 -0
- package/dist/definitions/helpers/router/__tests__/match-resource-from-route.d.ts +2 -0
- package/dist/definitions/helpers/router/__tests__/match-resource-from-route.d.ts.map +1 -0
- package/dist/definitions/helpers/router/__tests__/pick-matched-route.d.ts +2 -0
- package/dist/definitions/helpers/router/__tests__/pick-matched-route.d.ts.map +1 -0
- package/dist/definitions/helpers/router/__tests__/pick-route-params.d.ts +2 -0
- package/dist/definitions/helpers/router/__tests__/pick-route-params.d.ts.map +1 -0
- package/dist/definitions/helpers/router/__tests__/prepare-route-params.d.ts +2 -0
- package/dist/definitions/helpers/router/__tests__/prepare-route-params.d.ts.map +1 -0
- package/dist/definitions/helpers/router/__tests__/remove-leading-trailing-slashes.d.ts +2 -0
- package/dist/definitions/helpers/router/__tests__/remove-leading-trailing-slashes.d.ts.map +1 -0
- package/dist/definitions/helpers/router/__tests__/split-to-segments.d.ts +2 -0
- package/dist/definitions/helpers/router/__tests__/split-to-segments.d.ts.map +1 -0
- package/dist/definitions/helpers/router/check-by-segments.d.ts +9 -0
- package/dist/definitions/helpers/router/check-by-segments.d.ts.map +1 -0
- package/dist/definitions/helpers/router/compose-route.d.ts +10 -0
- package/dist/definitions/helpers/router/compose-route.d.ts.map +1 -0
- package/dist/definitions/helpers/router/get-action-routes-from-resource.d.ts +15 -0
- package/dist/definitions/helpers/router/get-action-routes-from-resource.d.ts.map +1 -0
- package/dist/definitions/helpers/router/get-default-action-path.d.ts +8 -0
- package/dist/definitions/helpers/router/get-default-action-path.d.ts.map +1 -0
- package/dist/definitions/helpers/router/get-parent-prefix-for-resource.d.ts +7 -0
- package/dist/definitions/helpers/router/get-parent-prefix-for-resource.d.ts.map +1 -0
- package/dist/definitions/helpers/router/get-parent-resource.d.ts +7 -0
- package/dist/definitions/helpers/router/get-parent-resource.d.ts.map +1 -0
- package/dist/definitions/helpers/router/index.d.ts +10 -0
- package/dist/definitions/helpers/router/index.d.ts.map +1 -0
- package/dist/definitions/helpers/router/is-parameter.d.ts +5 -0
- package/dist/definitions/helpers/router/is-parameter.d.ts.map +1 -0
- package/dist/definitions/helpers/router/is-segment-counts-same.d.ts +5 -0
- package/dist/definitions/helpers/router/is-segment-counts-same.d.ts.map +1 -0
- package/dist/definitions/helpers/router/match-resource-from-route.d.ts +14 -0
- package/dist/definitions/helpers/router/match-resource-from-route.d.ts.map +1 -0
- package/dist/definitions/helpers/router/pick-matched-route.d.ts +8 -0
- package/dist/definitions/helpers/router/pick-matched-route.d.ts.map +1 -0
- package/dist/definitions/helpers/router/pick-route-params.d.ts +6 -0
- package/dist/definitions/helpers/router/pick-route-params.d.ts.map +1 -0
- package/dist/definitions/helpers/router/prepare-route-params.d.ts +9 -0
- package/dist/definitions/helpers/router/prepare-route-params.d.ts.map +1 -0
- package/dist/definitions/helpers/router/remove-leading-trailing-slashes.d.ts +5 -0
- package/dist/definitions/helpers/router/remove-leading-trailing-slashes.d.ts.map +1 -0
- package/dist/definitions/helpers/router/split-to-segments.d.ts +5 -0
- package/dist/definitions/helpers/router/split-to-segments.d.ts.map +1 -0
- package/dist/definitions/helpers/sanitize-resource/index.d.ts +8 -0
- package/dist/definitions/helpers/sanitize-resource/index.d.ts.map +1 -0
- package/dist/definitions/helpers/sequentialPromises/index.d.ts +5 -0
- package/dist/definitions/helpers/sequentialPromises/index.d.ts.map +1 -0
- package/dist/definitions/helpers/treeView/createTreeView/index.d.ts +6 -0
- package/dist/definitions/helpers/treeView/createTreeView/index.d.ts.map +1 -0
- package/dist/definitions/helpers/treeView/index.d.ts +2 -0
- package/dist/definitions/helpers/treeView/index.d.ts.map +1 -0
- package/dist/definitions/helpers/useActiveAuthProvider/index.d.ts +34 -0
- package/dist/definitions/helpers/useActiveAuthProvider/index.d.ts.map +1 -0
- package/dist/definitions/helpers/useInfinitePagination/index.d.ts +4 -0
- package/dist/definitions/helpers/useInfinitePagination/index.d.ts.map +1 -0
- package/dist/definitions/helpers/userFriendlyResourceName/index.d.ts +6 -0
- package/dist/definitions/helpers/userFriendlyResourceName/index.d.ts.map +1 -0
- package/dist/definitions/helpers/userFriendlySeconds/index.d.ts +2 -0
- package/dist/definitions/helpers/userFriendlySeconds/index.d.ts.map +1 -0
- package/dist/definitions/index.d.ts +4 -0
- package/dist/definitions/index.d.ts.map +1 -0
- package/dist/definitions/table/index.d.ts +34 -0
- package/dist/definitions/table/index.d.ts.map +1 -0
- package/dist/definitions/upload/file2Base64/index.d.ts +2 -0
- package/dist/definitions/upload/file2Base64/index.d.ts.map +1 -0
- package/dist/definitions/upload/index.d.ts +2 -0
- package/dist/definitions/upload/index.d.ts.map +1 -0
- package/dist/esm/index.js +56 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/hooks/accessControl/index.d.ts +3 -0
- package/dist/hooks/accessControl/index.d.ts.map +1 -0
- package/dist/hooks/accessControl/useCan/index.d.ts +18 -0
- package/dist/hooks/accessControl/useCan/index.d.ts.map +1 -0
- package/dist/hooks/accessControl/useCanWithoutCache.d.ts +3 -0
- package/dist/hooks/accessControl/useCanWithoutCache.d.ts.map +1 -0
- package/dist/hooks/auditLog/index.d.ts +3 -0
- package/dist/hooks/auditLog/index.d.ts.map +1 -0
- package/dist/hooks/auditLog/useLog/index.d.ts +26 -0
- package/dist/hooks/auditLog/useLog/index.d.ts.map +1 -0
- package/dist/hooks/auditLog/useLogList/index.d.ts +16 -0
- package/dist/hooks/auditLog/useLogList/index.d.ts.map +1 -0
- package/dist/hooks/auth/index.d.ts +11 -0
- package/dist/hooks/auth/index.d.ts.map +1 -0
- package/dist/hooks/auth/useForgotPassword/index.d.ts +21 -0
- package/dist/hooks/auth/useForgotPassword/index.d.ts.map +1 -0
- package/dist/hooks/auth/useGetIdentity/index.d.ts +21 -0
- package/dist/hooks/auth/useGetIdentity/index.d.ts.map +1 -0
- package/dist/hooks/auth/useInvaliteAuthStore/index.d.ts +2 -0
- package/dist/hooks/auth/useInvaliteAuthStore/index.d.ts.map +1 -0
- package/dist/hooks/auth/useIsAuthenticated/index.d.ts +25 -0
- package/dist/hooks/auth/useIsAuthenticated/index.d.ts.map +1 -0
- package/dist/hooks/auth/useIsExistAuthentication/index.d.ts +6 -0
- package/dist/hooks/auth/useIsExistAuthentication/index.d.ts.map +1 -0
- package/dist/hooks/auth/useLogin/index.d.ts +22 -0
- package/dist/hooks/auth/useLogin/index.d.ts.map +1 -0
- package/dist/hooks/auth/useLogout/index.d.ts +26 -0
- package/dist/hooks/auth/useLogout/index.d.ts.map +1 -0
- package/dist/hooks/auth/useOnError/index.d.ts +22 -0
- package/dist/hooks/auth/useOnError/index.d.ts.map +1 -0
- package/dist/hooks/auth/usePermissions/index.d.ts +21 -0
- package/dist/hooks/auth/usePermissions/index.d.ts.map +1 -0
- package/dist/hooks/auth/useRegister/index.d.ts +21 -0
- package/dist/hooks/auth/useRegister/index.d.ts.map +1 -0
- package/dist/hooks/auth/useUpdatePassword/index.d.ts +21 -0
- package/dist/hooks/auth/useUpdatePassword/index.d.ts.map +1 -0
- package/dist/hooks/breadcrumb/index.d.ts +18 -0
- package/dist/hooks/breadcrumb/index.d.ts.map +1 -0
- package/dist/hooks/data/index.d.ts +15 -0
- package/dist/hooks/data/index.d.ts.map +1 -0
- package/dist/hooks/data/useApiUrl.d.ts +2 -0
- package/dist/hooks/data/useApiUrl.d.ts.map +1 -0
- package/dist/hooks/data/useCreate.d.ts +48 -0
- package/dist/hooks/data/useCreate.d.ts.map +1 -0
- package/dist/hooks/data/useCreateMany.d.ts +29 -0
- package/dist/hooks/data/useCreateMany.d.ts.map +1 -0
- package/dist/hooks/data/useCustom.d.ts +60 -0
- package/dist/hooks/data/useCustom.d.ts.map +1 -0
- package/dist/hooks/data/useCustomMutation.d.ts +40 -0
- package/dist/hooks/data/useCustomMutation.d.ts.map +1 -0
- package/dist/hooks/data/useDataProvider.d.ts +3 -0
- package/dist/hooks/data/useDataProvider.d.ts.map +1 -0
- package/dist/hooks/data/useDelete.d.ts +35 -0
- package/dist/hooks/data/useDelete.d.ts.map +1 -0
- package/dist/hooks/data/useDeleteMany.d.ts +35 -0
- package/dist/hooks/data/useDeleteMany.d.ts.map +1 -0
- package/dist/hooks/data/useInfiniteList.d.ts +67 -0
- package/dist/hooks/data/useInfiniteList.d.ts.map +1 -0
- package/dist/hooks/data/useList.d.ts +67 -0
- package/dist/hooks/data/useList.d.ts.map +1 -0
- package/dist/hooks/data/useMany.d.ts +44 -0
- package/dist/hooks/data/useMany.d.ts.map +1 -0
- package/dist/hooks/data/useOne.d.ts +44 -0
- package/dist/hooks/data/useOne.d.ts.map +1 -0
- package/dist/hooks/data/useUpdate.d.ts +64 -0
- package/dist/hooks/data/useUpdate.d.ts.map +1 -0
- package/dist/hooks/data/useUpdateMany.d.ts +40 -0
- package/dist/hooks/data/useUpdateMany.d.ts.map +1 -0
- package/dist/hooks/deepMemo/index.d.ts +7 -0
- package/dist/hooks/deepMemo/index.d.ts.map +1 -0
- package/dist/hooks/export/csvDownload.interface.d.ts +20 -0
- package/dist/hooks/export/csvDownload.interface.d.ts.map +1 -0
- package/dist/hooks/export/index.d.ts +75 -0
- package/dist/hooks/export/index.d.ts.map +1 -0
- package/dist/hooks/form/index.d.ts +2 -0
- package/dist/hooks/form/index.d.ts.map +1 -0
- package/dist/hooks/form/useForm.d.ts +103 -0
- package/dist/hooks/form/useForm.d.ts.map +1 -0
- package/dist/hooks/import/index.d.ts +100 -0
- package/dist/hooks/import/index.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +25 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/invalidate/index.d.ts +9 -0
- package/dist/hooks/invalidate/index.d.ts.map +1 -0
- package/dist/hooks/legacy-router/index.d.ts +2 -0
- package/dist/hooks/legacy-router/index.d.ts.map +1 -0
- package/dist/hooks/legacy-router/useRouterContext.d.ts +10 -0
- package/dist/hooks/legacy-router/useRouterContext.d.ts.map +1 -0
- package/dist/hooks/live/index.d.ts +5 -0
- package/dist/hooks/live/index.d.ts.map +1 -0
- package/dist/hooks/live/useLiveMode/index.d.ts +3 -0
- package/dist/hooks/live/useLiveMode/index.d.ts.map +1 -0
- package/dist/hooks/live/usePublish/index.d.ts +3 -0
- package/dist/hooks/live/usePublish/index.d.ts.map +1 -0
- package/dist/hooks/live/useResourceSubscription/index.d.ts +34 -0
- package/dist/hooks/live/useResourceSubscription/index.d.ts.map +1 -0
- package/dist/hooks/live/useSubscription/index.d.ts +46 -0
- package/dist/hooks/live/useSubscription/index.d.ts.map +1 -0
- package/dist/hooks/memoized/index.d.ts +6 -0
- package/dist/hooks/memoized/index.d.ts.map +1 -0
- package/dist/hooks/menu/index.d.ts +2 -0
- package/dist/hooks/menu/index.d.ts.map +1 -0
- package/dist/hooks/menu/useMenu.d.ts +28 -0
- package/dist/hooks/menu/useMenu.d.ts.map +1 -0
- package/dist/hooks/modal/index.d.ts +2 -0
- package/dist/hooks/modal/index.d.ts.map +1 -0
- package/dist/hooks/modal/useModal/index.d.ts +13 -0
- package/dist/hooks/modal/useModal/index.d.ts.map +1 -0
- package/dist/hooks/navigation/index.d.ts +27 -0
- package/dist/hooks/navigation/index.d.ts.map +1 -0
- package/dist/hooks/notification/index.d.ts +4 -0
- package/dist/hooks/notification/index.d.ts.map +1 -0
- package/dist/hooks/notification/useCancelNotification/index.d.ts +8 -0
- package/dist/hooks/notification/useCancelNotification/index.d.ts.map +1 -0
- package/dist/hooks/notification/useHandleNotification/index.d.ts +3 -0
- package/dist/hooks/notification/useHandleNotification/index.d.ts.map +1 -0
- package/dist/hooks/notification/useNotification/index.d.ts +3 -0
- package/dist/hooks/notification/useNotification/index.d.ts.map +1 -0
- package/dist/hooks/redirection/index.d.ts +9 -0
- package/dist/hooks/redirection/index.d.ts.map +1 -0
- package/dist/hooks/refine/index.d.ts +6 -0
- package/dist/hooks/refine/index.d.ts.map +1 -0
- package/dist/hooks/refine/useMutationMode.d.ts +15 -0
- package/dist/hooks/refine/useMutationMode.d.ts.map +1 -0
- package/dist/hooks/refine/useRefineContext.d.ts +19 -0
- package/dist/hooks/refine/useRefineContext.d.ts.map +1 -0
- package/dist/hooks/refine/useSyncWithLocation.d.ts +13 -0
- package/dist/hooks/refine/useSyncWithLocation.d.ts.map +1 -0
- package/dist/hooks/refine/useTitle.d.ts +10 -0
- package/dist/hooks/refine/useTitle.d.ts.map +1 -0
- package/dist/hooks/refine/useWarnAboutChange/index.d.ts +15 -0
- package/dist/hooks/refine/useWarnAboutChange/index.d.ts.map +1 -0
- package/dist/hooks/resource/index.d.ts +3 -0
- package/dist/hooks/resource/index.d.ts.map +1 -0
- package/dist/hooks/resource/useResource/index.d.ts +45 -0
- package/dist/hooks/resource/useResource/index.d.ts.map +1 -0
- package/dist/hooks/resource/useResourceWithRoute/index.d.ts +8 -0
- package/dist/hooks/resource/useResourceWithRoute/index.d.ts.map +1 -0
- package/dist/hooks/router/index.d.ts +8 -0
- package/dist/hooks/router/index.d.ts.map +1 -0
- package/dist/hooks/router/use-back/index.d.ts +2 -0
- package/dist/hooks/router/use-back/index.d.ts.map +1 -0
- package/dist/hooks/router/use-get-to-path/index.d.ts +18 -0
- package/dist/hooks/router/use-get-to-path/index.d.ts.map +1 -0
- package/dist/hooks/router/use-go/index.d.ts +2 -0
- package/dist/hooks/router/use-go/index.d.ts.map +1 -0
- package/dist/hooks/router/use-link/index.d.ts +6 -0
- package/dist/hooks/router/use-link/index.d.ts.map +1 -0
- package/dist/hooks/router/use-parse/index.d.ts +3 -0
- package/dist/hooks/router/use-parse/index.d.ts.map +1 -0
- package/dist/hooks/router/use-parsed/index.d.ts +2 -0
- package/dist/hooks/router/use-parsed/index.d.ts.map +1 -0
- package/dist/hooks/router/use-router-misuse-warning/index.d.ts +3 -0
- package/dist/hooks/router/use-router-misuse-warning/index.d.ts.map +1 -0
- package/dist/hooks/router/use-to-path/index.d.ts +17 -0
- package/dist/hooks/router/use-to-path/index.d.ts.map +1 -0
- package/dist/hooks/show/index.d.ts +2 -0
- package/dist/hooks/show/index.d.ts.map +1 -0
- package/dist/hooks/show/useShow.d.ts +47 -0
- package/dist/hooks/show/useShow.d.ts.map +1 -0
- package/dist/hooks/translate/index.d.ts +4 -0
- package/dist/hooks/translate/index.d.ts.map +1 -0
- package/dist/hooks/translate/useGetLocale.d.ts +9 -0
- package/dist/hooks/translate/useGetLocale.d.ts.map +1 -0
- package/dist/hooks/translate/useSetLocale.d.ts +8 -0
- package/dist/hooks/translate/useSetLocale.d.ts.map +1 -0
- package/dist/hooks/translate/useTranslate.d.ts +11 -0
- package/dist/hooks/translate/useTranslate.d.ts.map +1 -0
- package/dist/hooks/useSelect/index.d.ts +100 -0
- package/dist/hooks/useSelect/index.d.ts.map +1 -0
- package/dist/hooks/useTable/index.d.ts +153 -0
- package/dist/hooks/useTable/index.d.ts.map +1 -0
- package/dist/hooks/useTelemetryData/index.d.ts +3 -0
- package/dist/hooks/useTelemetryData/index.d.ts.map +1 -0
- package/dist/iife/index.js +56 -0
- package/dist/iife/index.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +56 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces/HttpError.d.ts +5 -0
- package/dist/interfaces/HttpError.d.ts.map +1 -0
- package/dist/interfaces/actions.d.ts +10 -0
- package/dist/interfaces/actions.d.ts.map +1 -0
- package/dist/interfaces/auditLog/index.d.ts +2 -0
- package/dist/interfaces/auditLog/index.d.ts.map +1 -0
- package/dist/interfaces/auditLog/logData.d.ts +14 -0
- package/dist/interfaces/auditLog/logData.d.ts.map +1 -0
- package/dist/interfaces/auth.d.ts +158 -0
- package/dist/interfaces/auth.d.ts.map +1 -0
- package/dist/interfaces/bindings/access-control.d.ts +50 -0
- package/dist/interfaces/bindings/access-control.d.ts.map +1 -0
- package/dist/interfaces/bindings/auth.d.ts +66 -0
- package/dist/interfaces/bindings/auth.d.ts.map +1 -0
- package/dist/interfaces/bindings/data.d.ts +15 -0
- package/dist/interfaces/bindings/data.d.ts.map +1 -0
- package/dist/interfaces/bindings/i18n.d.ts +19 -0
- package/dist/interfaces/bindings/i18n.d.ts.map +1 -0
- package/dist/interfaces/bindings/index.d.ts +9 -0
- package/dist/interfaces/bindings/index.d.ts.map +1 -0
- package/dist/interfaces/bindings/live.d.ts +43 -0
- package/dist/interfaces/bindings/live.d.ts.map +1 -0
- package/dist/interfaces/bindings/notifications.d.ts +24 -0
- package/dist/interfaces/bindings/notifications.d.ts.map +1 -0
- package/dist/interfaces/bindings/resource.d.ts +150 -0
- package/dist/interfaces/bindings/resource.d.ts.map +1 -0
- package/dist/interfaces/bindings/router.d.ts +70 -0
- package/dist/interfaces/bindings/router.d.ts.map +1 -0
- package/dist/interfaces/customComponents.d.ts +26 -0
- package/dist/interfaces/customComponents.d.ts.map +1 -0
- package/dist/interfaces/form-url-params.d.ts +12 -0
- package/dist/interfaces/form-url-params.d.ts.map +1 -0
- package/dist/interfaces/index.d.ts +49 -0
- package/dist/interfaces/index.d.ts.map +1 -0
- package/dist/interfaces/live/LiveEvent.d.ts +11 -0
- package/dist/interfaces/live/LiveEvent.d.ts.map +1 -0
- package/dist/interfaces/live/LiveModeProps.d.ts +27 -0
- package/dist/interfaces/live/LiveModeProps.d.ts.map +1 -0
- package/dist/interfaces/live/index.d.ts +3 -0
- package/dist/interfaces/live/index.d.ts.map +1 -0
- package/dist/interfaces/mapDataFn.d.ts +4 -0
- package/dist/interfaces/mapDataFn.d.ts.map +1 -0
- package/dist/interfaces/metaData/fields.d.ts +3 -0
- package/dist/interfaces/metaData/fields.d.ts.map +1 -0
- package/dist/interfaces/metaData/index.d.ts +3 -0
- package/dist/interfaces/metaData/index.d.ts.map +1 -0
- package/dist/interfaces/metaData/metaDataQuery.d.ts +10 -0
- package/dist/interfaces/metaData/metaDataQuery.d.ts.map +1 -0
- package/dist/interfaces/metaData/metaQuery.d.ts +7 -0
- package/dist/interfaces/metaData/metaQuery.d.ts.map +1 -0
- package/dist/interfaces/metaData/nestedField.d.ts +8 -0
- package/dist/interfaces/metaData/nestedField.d.ts.map +1 -0
- package/dist/interfaces/metaData/queryBuilderOptions.d.ts +8 -0
- package/dist/interfaces/metaData/queryBuilderOptions.d.ts.map +1 -0
- package/dist/interfaces/metaData/variableOptions.d.ts +10 -0
- package/dist/interfaces/metaData/variableOptions.d.ts.map +1 -0
- package/dist/interfaces/mutationMode.d.ts +17 -0
- package/dist/interfaces/mutationMode.d.ts.map +1 -0
- package/dist/interfaces/notification.d.ts +11 -0
- package/dist/interfaces/notification.d.ts.map +1 -0
- package/dist/interfaces/prettify.d.ts +4 -0
- package/dist/interfaces/prettify.d.ts.map +1 -0
- package/dist/interfaces/queryKey.d.ts +17 -0
- package/dist/interfaces/queryKey.d.ts.map +1 -0
- package/dist/interfaces/resourceErrorRouterParams.d.ts +6 -0
- package/dist/interfaces/resourceErrorRouterParams.d.ts.map +1 -0
- package/dist/interfaces/resourceRouterParams.d.ts +7 -0
- package/dist/interfaces/resourceRouterParams.d.ts.map +1 -0
- package/dist/interfaces/successErrorNotification.d.ts +15 -0
- package/dist/interfaces/successErrorNotification.d.ts.map +1 -0
- package/dist/interfaces/telementry.d.ts +15 -0
- package/dist/interfaces/telementry.d.ts.map +1 -0
- package/package.json +67 -0
- package/refine.config.js +120 -0
- package/src/components/authenticated/index.tsx +202 -0
- package/src/components/canAccess/index.tsx +42 -0
- package/src/components/containers/index.ts +1 -0
- package/src/components/containers/refine/index.tsx +412 -0
- package/src/components/gh-banner/index.tsx +75 -0
- package/src/components/gh-banner/styles.ts +59 -0
- package/src/components/index.ts +9 -0
- package/src/components/layoutWrapper/defaultLayout/index.tsx +7 -0
- package/src/components/layoutWrapper/index.tsx +121 -0
- package/src/components/pages/auth/components/forgotPassword/index.tsx +122 -0
- package/src/components/pages/auth/components/index.ts +4 -0
- package/src/components/pages/auth/components/login/index.tsx +182 -0
- package/src/components/pages/auth/components/register/index.tsx +168 -0
- package/src/components/pages/auth/components/updatePassword/index.tsx +104 -0
- package/src/components/pages/auth/index.tsx +52 -0
- package/src/components/pages/error/index.tsx +64 -0
- package/src/components/pages/index.tsx +7 -0
- package/src/components/pages/login/index.tsx +91 -0
- package/src/components/pages/ready/index.tsx +39 -0
- package/src/components/pages/welcome/index.tsx +32 -0
- package/src/components/routeChangeHandler/index.tsx +16 -0
- package/src/components/telemetry/index.tsx +32 -0
- package/src/components/undoableQueue/index.tsx +68 -0
- package/src/contexts/accessControl/IAccessControlContext.ts +32 -0
- package/src/contexts/accessControl/index.tsx +22 -0
- package/src/contexts/auditLog/IAuditLogContext.ts +31 -0
- package/src/contexts/auditLog/index.tsx +17 -0
- package/src/contexts/auth/IAuthContext.ts +27 -0
- package/src/contexts/auth/index.tsx +203 -0
- package/src/contexts/data/IDataContext.ts +285 -0
- package/src/contexts/data/index.tsx +50 -0
- package/src/contexts/legacy-router/IRouterContext.ts +37 -0
- package/src/contexts/legacy-router/index.tsx +45 -0
- package/src/contexts/live/ILiveContext.ts +48 -0
- package/src/contexts/live/index.tsx +16 -0
- package/src/contexts/notification/INotificationContext.ts +15 -0
- package/src/contexts/notification/index.tsx +20 -0
- package/src/contexts/refine/IRefineContext.ts +116 -0
- package/src/contexts/refine/index.tsx +87 -0
- package/src/contexts/resource/IResourceContext.ts +68 -0
- package/src/contexts/resource/index.tsx +34 -0
- package/src/contexts/router/index.tsx +17 -0
- package/src/contexts/router-picker/index.tsx +21 -0
- package/src/contexts/translation/ITranslationContext.ts +19 -0
- package/src/contexts/translation/index.tsx +24 -0
- package/src/contexts/undoableQueue/IUndoableQueueContext.ts +6 -0
- package/src/contexts/undoableQueue/actionTypes.ts +5 -0
- package/src/contexts/undoableQueue/index.ts +5 -0
- package/src/contexts/undoableQueue/undoableQueueContext.tsx +83 -0
- package/src/contexts/unsavedWarn/IUnsavedWarnContext.ts +4 -0
- package/src/contexts/unsavedWarn/index.tsx +17 -0
- package/src/definitions/helpers/check-router-prop-misuse/index.ts +30 -0
- package/src/definitions/helpers/handleMultiple/index.ts +7 -0
- package/src/definitions/helpers/handlePaginationParams/index.ts +30 -0
- package/src/definitions/helpers/handleRefineOptions/index.ts +94 -0
- package/src/definitions/helpers/handleUseParams/index.tsx +9 -0
- package/src/definitions/helpers/hasPermission/index.ts +9 -0
- package/src/definitions/helpers/humanizeString/index.ts +14 -0
- package/src/definitions/helpers/importCSVMapper/index.ts +15 -0
- package/src/definitions/helpers/index.ts +25 -0
- package/src/definitions/helpers/legacy-resource-transform/index.ts +30 -0
- package/src/definitions/helpers/menu/create-resource-key.ts +33 -0
- package/src/definitions/helpers/menu/create-tree.ts +87 -0
- package/src/definitions/helpers/pick-resource/index.ts +40 -0
- package/src/definitions/helpers/pickDataProvider/index.ts +29 -0
- package/src/definitions/helpers/pickNotDeprecated/index.ts +9 -0
- package/src/definitions/helpers/queryKeys/index.ts +47 -0
- package/src/definitions/helpers/redirectPage/index.ts +28 -0
- package/src/definitions/helpers/routeGenerator/index.ts +29 -0
- package/src/definitions/helpers/router/__tests__/check-by-segments.ts +24 -0
- package/src/definitions/helpers/router/__tests__/compose-route.ts +42 -0
- package/src/definitions/helpers/router/__tests__/get-action-routes-from-resource.ts +169 -0
- package/src/definitions/helpers/router/__tests__/get-default-action-path.ts +47 -0
- package/src/definitions/helpers/router/__tests__/get-parent-prefix-for-resource.ts +84 -0
- package/src/definitions/helpers/router/__tests__/get-parent-resource.ts +51 -0
- package/src/definitions/helpers/router/__tests__/is-segment-counts-same.ts +21 -0
- package/src/definitions/helpers/router/__tests__/match-resource-from-route.ts +59 -0
- package/src/definitions/helpers/router/__tests__/pick-matched-route.ts +89 -0
- package/src/definitions/helpers/router/__tests__/pick-route-params.ts +18 -0
- package/src/definitions/helpers/router/__tests__/prepare-route-params.ts +23 -0
- package/src/definitions/helpers/router/__tests__/remove-leading-trailing-slashes.ts +15 -0
- package/src/definitions/helpers/router/__tests__/split-to-segments.ts +15 -0
- package/src/definitions/helpers/router/check-by-segments.ts +28 -0
- package/src/definitions/helpers/router/compose-route.ts +30 -0
- package/src/definitions/helpers/router/get-action-routes-from-resource.ts +71 -0
- package/src/definitions/helpers/router/get-default-action-path.ts +33 -0
- package/src/definitions/helpers/router/get-parent-prefix-for-resource.ts +39 -0
- package/src/definitions/helpers/router/get-parent-resource.ts +31 -0
- package/src/definitions/helpers/router/index.ts +10 -0
- package/src/definitions/helpers/router/is-parameter.ts +6 -0
- package/src/definitions/helpers/router/is-segment-counts-same.ts +11 -0
- package/src/definitions/helpers/router/match-resource-from-route.ts +37 -0
- package/src/definitions/helpers/router/pick-matched-route.ts +61 -0
- package/src/definitions/helpers/router/pick-route-params.ts +19 -0
- package/src/definitions/helpers/router/prepare-route-params.ts +32 -0
- package/src/definitions/helpers/router/remove-leading-trailing-slashes.ts +6 -0
- package/src/definitions/helpers/router/split-to-segments.ts +7 -0
- package/src/definitions/helpers/sanitize-resource/index.ts +31 -0
- package/src/definitions/helpers/sequentialPromises/index.ts +32 -0
- package/src/definitions/helpers/treeView/createTreeView/index.ts +44 -0
- package/src/definitions/helpers/treeView/index.ts +1 -0
- package/src/definitions/helpers/useActiveAuthProvider/index.ts +30 -0
- package/src/definitions/helpers/useInfinitePagination/index.ts +30 -0
- package/src/definitions/helpers/userFriendlyResourceName/index.ts +17 -0
- package/src/definitions/helpers/userFriendlySeconds/index.ts +3 -0
- package/src/definitions/index.ts +3 -0
- package/src/definitions/table/__snapshots__/index.spec.ts.snap +7 -0
- package/src/definitions/table/index.ts +192 -0
- package/src/definitions/upload/file2Base64/index.ts +21 -0
- package/src/definitions/upload/index.ts +1 -0
- package/src/hooks/accessControl/index.ts +2 -0
- package/src/hooks/accessControl/useCan/index.ts +69 -0
- package/src/hooks/accessControl/useCanWithoutCache.ts +10 -0
- package/src/hooks/auditLog/index.ts +2 -0
- package/src/hooks/auditLog/useLog/index.ts +139 -0
- package/src/hooks/auditLog/useLogList/index.ts +55 -0
- package/src/hooks/auth/index.ts +10 -0
- package/src/hooks/auth/useForgotPassword/index.ts +174 -0
- package/src/hooks/auth/useGetIdentity/index.ts +92 -0
- package/src/hooks/auth/useInvaliteAuthStore/index.ts +13 -0
- package/src/hooks/auth/useIsAuthenticated/index.ts +80 -0
- package/src/hooks/auth/useIsExistAuthentication/index.ts +12 -0
- package/src/hooks/auth/useLogin/index.ts +220 -0
- package/src/hooks/auth/useLogout/index.ts +199 -0
- package/src/hooks/auth/useOnError/index.ts +110 -0
- package/src/hooks/auth/usePermissions/index.ts +87 -0
- package/src/hooks/auth/useRegister/index.ts +186 -0
- package/src/hooks/auth/useUpdatePassword/index.ts +215 -0
- package/src/hooks/breadcrumb/index.ts +126 -0
- package/src/hooks/data/index.ts +18 -0
- package/src/hooks/data/useApiUrl.ts +9 -0
- package/src/hooks/data/useCreate.ts +258 -0
- package/src/hooks/data/useCreateMany.ts +239 -0
- package/src/hooks/data/useCustom.ts +177 -0
- package/src/hooks/data/useCustomMutation.ts +188 -0
- package/src/hooks/data/useDataProvider.tsx +39 -0
- package/src/hooks/data/useDelete.ts +415 -0
- package/src/hooks/data/useDeleteMany.ts +442 -0
- package/src/hooks/data/useInfiniteList.ts +290 -0
- package/src/hooks/data/useList.ts +300 -0
- package/src/hooks/data/useMany.ts +202 -0
- package/src/hooks/data/useOne.ts +205 -0
- package/src/hooks/data/useUpdate.ts +488 -0
- package/src/hooks/data/useUpdateMany.ts +496 -0
- package/src/hooks/deepMemo/index.tsx +17 -0
- package/src/hooks/export/csvDownload.interface.ts +27 -0
- package/src/hooks/export/index.ts +189 -0
- package/src/hooks/form/index.ts +1 -0
- package/src/hooks/form/useForm.ts +524 -0
- package/src/hooks/import/index.tsx +336 -0
- package/src/hooks/index.ts +24 -0
- package/src/hooks/invalidate/index.tsx +62 -0
- package/src/hooks/legacy-router/index.ts +1 -0
- package/src/hooks/legacy-router/useRouterContext.ts +18 -0
- package/src/hooks/live/index.ts +4 -0
- package/src/hooks/live/useLiveMode/index.ts +12 -0
- package/src/hooks/live/usePublish/index.ts +10 -0
- package/src/hooks/live/useResourceSubscription/index.ts +99 -0
- package/src/hooks/live/useSubscription/index.ts +85 -0
- package/src/hooks/memoized/index.tsx +16 -0
- package/src/hooks/menu/index.ts +1 -0
- package/src/hooks/menu/useMenu.tsx +153 -0
- package/src/hooks/modal/index.ts +1 -0
- package/src/hooks/modal/useModal/index.tsx +29 -0
- package/src/hooks/navigation/index.ts +385 -0
- package/src/hooks/notification/index.ts +3 -0
- package/src/hooks/notification/useCancelNotification/index.tsx +16 -0
- package/src/hooks/notification/useHandleNotification/index.ts +26 -0
- package/src/hooks/notification/useNotification/index.ts +10 -0
- package/src/hooks/redirection/index.ts +56 -0
- package/src/hooks/refine/index.ts +5 -0
- package/src/hooks/refine/useMutationMode.ts +22 -0
- package/src/hooks/refine/useRefineContext.ts +41 -0
- package/src/hooks/refine/useSyncWithLocation.ts +20 -0
- package/src/hooks/refine/useTitle.tsx +15 -0
- package/src/hooks/refine/useWarnAboutChange/index.ts +32 -0
- package/src/hooks/resource/index.ts +2 -0
- package/src/hooks/resource/useResource/index.ts +151 -0
- package/src/hooks/resource/useResourceWithRoute/index.ts +27 -0
- package/src/hooks/router/index.ts +7 -0
- package/src/hooks/router/use-back/index.tsx +15 -0
- package/src/hooks/router/use-get-to-path/index.ts +60 -0
- package/src/hooks/router/use-go/index.tsx +15 -0
- package/src/hooks/router/use-link/index.tsx +17 -0
- package/src/hooks/router/use-parse/index.tsx +21 -0
- package/src/hooks/router/use-parsed/index.tsx +10 -0
- package/src/hooks/router/use-router-misuse-warning/index.ts +18 -0
- package/src/hooks/router/use-to-path/index.ts +27 -0
- package/src/hooks/show/index.ts +1 -0
- package/src/hooks/show/useShow.ts +183 -0
- package/src/hooks/translate/index.ts +3 -0
- package/src/hooks/translate/useGetLocale.ts +16 -0
- package/src/hooks/translate/useSetLocale.ts +14 -0
- package/src/hooks/translate/useTranslate.ts +40 -0
- package/src/hooks/useSelect/index.ts +280 -0
- package/src/hooks/useTable/index.ts +544 -0
- package/src/hooks/useTelemetryData/index.ts +73 -0
- package/src/index.tsx +120 -0
- package/src/interfaces/HttpError.ts +4 -0
- package/src/interfaces/actions.ts +16 -0
- package/src/interfaces/auditLog/index.ts +1 -0
- package/src/interfaces/auditLog/logData.ts +15 -0
- package/src/interfaces/auth.tsx +192 -0
- package/src/interfaces/bindings/access-control.ts +53 -0
- package/src/interfaces/bindings/auth.ts +72 -0
- package/src/interfaces/bindings/data.ts +18 -0
- package/src/interfaces/bindings/i18n.ts +29 -0
- package/src/interfaces/bindings/index.ts +24 -0
- package/src/interfaces/bindings/live.ts +56 -0
- package/src/interfaces/bindings/notifications.ts +25 -0
- package/src/interfaces/bindings/resource.ts +178 -0
- package/src/interfaces/bindings/router.ts +73 -0
- package/src/interfaces/customComponents.ts +28 -0
- package/src/interfaces/form-url-params.ts +8 -0
- package/src/interfaces/index.ts +86 -0
- package/src/interfaces/live/LiveEvent.ts +11 -0
- package/src/interfaces/live/LiveModeProps.ts +28 -0
- package/src/interfaces/live/index.ts +2 -0
- package/src/interfaces/mapDataFn.ts +3 -0
- package/src/interfaces/metaData/fields.ts +3 -0
- package/src/interfaces/metaData/index.ts +2 -0
- package/src/interfaces/metaData/metaDataQuery.ts +10 -0
- package/src/interfaces/metaData/metaQuery.ts +7 -0
- package/src/interfaces/metaData/nestedField.ts +8 -0
- package/src/interfaces/metaData/queryBuilderOptions.ts +8 -0
- package/src/interfaces/metaData/variableOptions.ts +9 -0
- package/src/interfaces/mutationMode.ts +29 -0
- package/src/interfaces/notification.ts +10 -0
- package/src/interfaces/prettify.ts +3 -0
- package/src/interfaces/queryKey.ts +23 -0
- package/src/interfaces/resourceErrorRouterParams.ts +6 -0
- package/src/interfaces/resourceRouterParams.ts +7 -0
- package/src/interfaces/successErrorNotification.ts +33 -0
- package/src/interfaces/telementry.ts +14 -0
- package/tsconfig.json +28 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { QueryObserverResult, UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { CustomResponse, CrudSorting, CrudFilters, BaseRecord, HttpError, MetaQuery, SuccessErrorNotification } from "../../interfaces";
|
|
3
|
+
interface UseCustomConfig<TQuery, TPayload> {
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated `sort` is deprecated, use `sorters` instead.
|
|
6
|
+
*/
|
|
7
|
+
sort?: CrudSorting;
|
|
8
|
+
sorters?: CrudSorting;
|
|
9
|
+
filters?: CrudFilters;
|
|
10
|
+
query?: TQuery;
|
|
11
|
+
payload?: TPayload;
|
|
12
|
+
headers?: {};
|
|
13
|
+
}
|
|
14
|
+
export declare type UseCustomProps<TData, TError, TQuery, TPayload> = {
|
|
15
|
+
/**
|
|
16
|
+
* request's URL
|
|
17
|
+
*/
|
|
18
|
+
url: string;
|
|
19
|
+
/**
|
|
20
|
+
* request's method (`GET`, `POST`, etc.)
|
|
21
|
+
*/
|
|
22
|
+
method: "get" | "delete" | "head" | "options" | "post" | "put" | "patch";
|
|
23
|
+
/**
|
|
24
|
+
* The config of your request. You can send headers, payload, query, filters and sorters using this field
|
|
25
|
+
*/
|
|
26
|
+
config?: UseCustomConfig<TQuery, TPayload>;
|
|
27
|
+
/**
|
|
28
|
+
* react-query's [useQuery](https://tanstack.com/query/v4/docs/reference/useQuery) options"
|
|
29
|
+
*/
|
|
30
|
+
queryOptions?: UseQueryOptions<CustomResponse<TData>, TError>;
|
|
31
|
+
/**
|
|
32
|
+
* meta data for `dataProvider`
|
|
33
|
+
*/
|
|
34
|
+
meta?: MetaQuery;
|
|
35
|
+
/**
|
|
36
|
+
* meta data for `dataProvider`
|
|
37
|
+
* @deprecated `metaData` is deprecated with refine@4, refine will pass `meta` instead, however, we still support `metaData` for backward compatibility.
|
|
38
|
+
*/
|
|
39
|
+
metaData?: MetaQuery;
|
|
40
|
+
/**
|
|
41
|
+
* If there is more than one `dataProvider`, you should use the `dataProviderName` that you will use.
|
|
42
|
+
*/
|
|
43
|
+
dataProviderName?: string;
|
|
44
|
+
} & SuccessErrorNotification;
|
|
45
|
+
/**
|
|
46
|
+
* `useCustom` is a modified version of `react-query`'s {@link https://react-query.tanstack.com/guides/queries `useQuery`} used for custom requests.
|
|
47
|
+
*
|
|
48
|
+
* It uses the `custom` method from the `dataProvider` which is passed to `<Refine>`.
|
|
49
|
+
*
|
|
50
|
+
* @see {@link https://refine.dev/docs/core/hooks/data/useCustom} for more details.
|
|
51
|
+
*
|
|
52
|
+
* @typeParam TData - Result data of the query extends {@link https://refine.dev/docs/core/interfaceReferences#baserecord `BaseRecord`}
|
|
53
|
+
* @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/core/interfaceReferences#httperror `HttpError`}
|
|
54
|
+
* @typeParam TQuery - Values for query params
|
|
55
|
+
* @typeParam TPayload - Values for params
|
|
56
|
+
*
|
|
57
|
+
*/
|
|
58
|
+
export declare const useCustom: <TData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TQuery = unknown, TPayload = unknown>({ url, method, config, queryOptions, successNotification, errorNotification, meta, metaData, dataProviderName, }: UseCustomProps<TData, TError, TQuery, TPayload>) => QueryObserverResult<CustomResponse<TData>, TError>;
|
|
59
|
+
export {};
|
|
60
|
+
//# sourceMappingURL=useCustom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCustom.d.ts","sourceRoot":"","sources":["../../../src/hooks/data/useCustom.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,mBAAmB,EAEnB,eAAe,EAClB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACH,cAAc,EACd,WAAW,EACX,WAAW,EACX,UAAU,EACV,SAAS,EACT,SAAS,EACT,wBAAwB,EAC3B,MAAM,kBAAkB,CAAC;AAS1B,UAAU,eAAe,CAAC,MAAM,EAAE,QAAQ;IACtC;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,OAAO,CAAC,EAAE,EAAE,CAAC;CAChB;AAED,oBAAY,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,IAAI;IAC1D;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,MAAM,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC;IACzE;;OAEG;IACH,MAAM,CAAC,EAAE,eAAe,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC3C;;OAEG;IACH,YAAY,CAAC,EAAE,eAAe,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC;IAC9D;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B,GAAG,wBAAwB,CAAC;AAE7B;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,SAAS,8UAgGrB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { UseMutationOptions, UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import { CreateResponse, BaseRecord, HttpError, SuccessErrorNotification, MetaQuery } from "../../interfaces";
|
|
3
|
+
interface UseCustomMutationConfig {
|
|
4
|
+
headers?: {};
|
|
5
|
+
}
|
|
6
|
+
declare type useCustomMutationParams<TVariables> = {
|
|
7
|
+
url: string;
|
|
8
|
+
method: "post" | "put" | "patch" | "delete";
|
|
9
|
+
values: TVariables;
|
|
10
|
+
/**
|
|
11
|
+
* Meta data for `dataProvider`
|
|
12
|
+
*/
|
|
13
|
+
meta?: MetaQuery;
|
|
14
|
+
/**
|
|
15
|
+
* Meta data for `dataProvider`
|
|
16
|
+
* @deprecated `metaData` is deprecated with refine@4, refine will pass `meta` instead, however, we still support `metaData` for backward compatibility.
|
|
17
|
+
*/
|
|
18
|
+
metaData?: MetaQuery;
|
|
19
|
+
dataProviderName?: string;
|
|
20
|
+
config?: UseCustomMutationConfig;
|
|
21
|
+
} & SuccessErrorNotification;
|
|
22
|
+
export declare type UseCustomMutationReturnType<TData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}> = UseMutationResult<CreateResponse<TData>, TError, useCustomMutationParams<TVariables>, unknown>;
|
|
23
|
+
export declare type UseCustomMutationProps<TData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}> = {
|
|
24
|
+
mutationOptions?: Omit<UseMutationOptions<CreateResponse<TData>, TError, useCustomMutationParams<TVariables>, unknown>, "mutationFn" | "onError" | "onSuccess">;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* `useCustomMutation` is a modified version of `react-query`'s {@link https://react-query.tanstack.com/reference/useMutation `useMutation`} for create mutations.
|
|
28
|
+
*
|
|
29
|
+
* It uses the `custom` method from the `dataProvider` which is passed to `<Refine>`.
|
|
30
|
+
*
|
|
31
|
+
* @see {@link https://refine.dev/docs/api-references/hooks/data/useCustomMutation} for more details.
|
|
32
|
+
*
|
|
33
|
+
* @typeParam TData - Result data of the query extends {@link https://refine.dev/docs/api-references/interfaceReferences#baserecord `BaseRecord`}
|
|
34
|
+
* @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/api-references/interfaceReferences#httperror `HttpError`}
|
|
35
|
+
* @typeParam TVariables - Values for mutation function
|
|
36
|
+
*
|
|
37
|
+
*/
|
|
38
|
+
export declare const useCustomMutation: <TData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}>({ mutationOptions, }?: UseCustomMutationProps<TData, TError, TVariables>) => UseCustomMutationReturnType<TData, TError, TVariables>;
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=useCustomMutation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCustomMutation.d.ts","sourceRoot":"","sources":["../../../src/hooks/data/useCustomMutation.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,kBAAkB,EAClB,iBAAiB,EACpB,MAAM,uBAAuB,CAAC;AAQ/B,OAAO,EACH,cAAc,EACd,UAAU,EACV,SAAS,EACT,wBAAwB,EACxB,SAAS,EACZ,MAAM,kBAAkB,CAAC;AAG1B,UAAU,uBAAuB;IAC7B,OAAO,CAAC,EAAE,EAAE,CAAC;CAChB;AAED,aAAK,uBAAuB,CAAC,UAAU,IAAI;IACvC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;IAC5C,MAAM,EAAE,UAAU,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,MAAM,CAAC,EAAE,uBAAuB,CAAC;CACpC,GAAG,wBAAwB,CAAC;AAE7B,oBAAY,2BAA2B,CACnC,KAAK,SAAS,UAAU,GAAG,UAAU,EACrC,MAAM,SAAS,SAAS,GAAG,SAAS,EACpC,UAAU,GAAG,EAAE,IACf,iBAAiB,CACjB,cAAc,CAAC,KAAK,CAAC,EACrB,MAAM,EACN,uBAAuB,CAAC,UAAU,CAAC,EACnC,OAAO,CACV,CAAC;AAEF,oBAAY,sBAAsB,CAC9B,KAAK,SAAS,UAAU,GAAG,UAAU,EACrC,MAAM,SAAS,SAAS,GAAG,SAAS,EACpC,UAAU,GAAG,EAAE,IACf;IACA,eAAe,CAAC,EAAE,IAAI,CAClB,kBAAkB,CACd,cAAc,CAAC,KAAK,CAAC,EACrB,MAAM,EACN,uBAAuB,CAAC,UAAU,CAAC,EACnC,OAAO,CACV,EACD,YAAY,GAAG,SAAS,GAAG,WAAW,CACzC,CAAC;CACL,CAAC;AAEF;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,iBAAiB,oOAyG7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDataProvider.d.ts","sourceRoot":"","sources":["../../../src/hooks/data/useDataProvider.tsx"],"names":[],"mappings":"AAGA,OAAO,EACH,oBAAoB,EAEvB,MAAM,kBAAkB,CAAC;AAE1B,eAAO,MAAM,eAAe,4BAIL,MAAM,KACxB,oBAyBJ,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { UseMutationResult, UseMutationOptions } from "@tanstack/react-query";
|
|
2
|
+
import { DeleteOneResponse, MutationMode, PrevContext as DeleteContext, BaseRecord, BaseKey, HttpError, SuccessErrorNotification, IQueryKeys, MetaQuery } from "../../interfaces";
|
|
3
|
+
export declare type DeleteParams<TVariables> = {
|
|
4
|
+
id: BaseKey;
|
|
5
|
+
resource: string;
|
|
6
|
+
mutationMode?: MutationMode;
|
|
7
|
+
undoableTimeout?: number;
|
|
8
|
+
onCancel?: (cancelMutation: () => void) => void;
|
|
9
|
+
meta?: MetaQuery;
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated `metaData` is deprecated with refine@4, refine will pass `meta` instead, however, we still support `metaData` for backward compatibility.
|
|
12
|
+
*/
|
|
13
|
+
metaData?: MetaQuery;
|
|
14
|
+
dataProviderName?: string;
|
|
15
|
+
invalidates?: Array<keyof IQueryKeys>;
|
|
16
|
+
values?: TVariables;
|
|
17
|
+
} & SuccessErrorNotification;
|
|
18
|
+
export declare type UseDeleteReturnType<TData extends BaseRecord = BaseRecord, TError = HttpError, TVariables = {}> = UseMutationResult<DeleteOneResponse<TData>, TError, DeleteParams<TVariables>, DeleteContext<TData>>;
|
|
19
|
+
export declare type UseDeleteProps<TData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}> = {
|
|
20
|
+
mutationOptions?: Omit<UseMutationOptions<DeleteOneResponse<TData>, TError, DeleteParams<TVariables>, DeleteContext<TData>>, "mutationFn" | "onError" | "onSuccess" | "onSettled" | "onMutate">;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* `useDelete` is a modified version of `react-query`'s {@link https://react-query.tanstack.com/reference/useMutation `useMutation`} for delete mutations.
|
|
24
|
+
*
|
|
25
|
+
* It uses `deleteOne` method as mutation function from the `dataProvider` which is passed to `<Refine>`.
|
|
26
|
+
*
|
|
27
|
+
* @see {@link https://refine.dev/docs/api-references/hooks/data/useDelete} for more details.
|
|
28
|
+
*
|
|
29
|
+
* @typeParam TData - Result data of the query extends {@link https://refine.dev/docs/api-references/interfaceReferences#baserecord `BaseRecord`}
|
|
30
|
+
* @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/api-references/interfaceReferences#httperror `HttpError`}
|
|
31
|
+
* @typeParam TVariables - Values for params. default `{}`
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
export declare const useDelete: <TData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}>({ mutationOptions, }?: UseDeleteProps<TData, TError, TVariables>) => UseDeleteReturnType<TData, TError, TVariables>;
|
|
35
|
+
//# sourceMappingURL=useDelete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDelete.d.ts","sourceRoot":"","sources":["../../../src/hooks/data/useDelete.ts"],"names":[],"mappings":"AAAA,OAAO,EAGH,iBAAiB,EACjB,kBAAkB,EACrB,MAAM,uBAAuB,CAAC;AAgB/B,OAAO,EACH,iBAAiB,EACjB,YAAY,EACZ,WAAW,IAAI,aAAa,EAC5B,UAAU,EACV,OAAO,EACP,SAAS,EAET,wBAAwB,EAExB,UAAU,EACV,SAAS,EACZ,MAAM,kBAAkB,CAAC;AAQ1B,oBAAY,YAAY,CAAC,UAAU,IAAI;IACnC,EAAE,EAAE,OAAO,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;IAChD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,UAAU,CAAC,CAAC;IACtC,MAAM,CAAC,EAAE,UAAU,CAAC;CACvB,GAAG,wBAAwB,CAAC;AAE7B,oBAAY,mBAAmB,CAC3B,KAAK,SAAS,UAAU,GAAG,UAAU,EACrC,MAAM,GAAG,SAAS,EAClB,UAAU,GAAG,EAAE,IACf,iBAAiB,CACjB,iBAAiB,CAAC,KAAK,CAAC,EACxB,MAAM,EACN,YAAY,CAAC,UAAU,CAAC,EACxB,aAAa,CAAC,KAAK,CAAC,CACvB,CAAC;AAEF,oBAAY,cAAc,CACtB,KAAK,SAAS,UAAU,GAAG,UAAU,EACrC,MAAM,SAAS,SAAS,GAAG,SAAS,EACpC,UAAU,GAAG,EAAE,IACf;IACA,eAAe,CAAC,EAAE,IAAI,CAClB,kBAAkB,CACd,iBAAiB,CAAC,KAAK,CAAC,EACxB,MAAM,EACN,YAAY,CAAC,UAAU,CAAC,EACxB,aAAa,CAAC,KAAK,CAAC,CACvB,EACD,YAAY,GAAG,SAAS,GAAG,WAAW,GAAG,WAAW,GAAG,UAAU,CACpE,CAAC;CACL,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,SAAS,oNA8TrB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { UseMutationResult, UseMutationOptions } from "@tanstack/react-query";
|
|
2
|
+
import { DeleteManyResponse, HttpError, BaseRecord, BaseKey, MutationMode, PrevContext as DeleteContext, SuccessErrorNotification, MetaQuery, IQueryKeys } from "../../interfaces";
|
|
3
|
+
export declare type DeleteManyParams<TVariables> = {
|
|
4
|
+
ids: BaseKey[];
|
|
5
|
+
resource: string;
|
|
6
|
+
mutationMode?: MutationMode;
|
|
7
|
+
undoableTimeout?: number;
|
|
8
|
+
onCancel?: (cancelMutation: () => void) => void;
|
|
9
|
+
meta?: MetaQuery;
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated `metaData` is deprecated with refine@4, refine will pass `meta` instead, however, we still support `metaData` for backward compatibility.
|
|
12
|
+
*/
|
|
13
|
+
metaData?: MetaQuery;
|
|
14
|
+
dataProviderName?: string;
|
|
15
|
+
invalidates?: Array<keyof IQueryKeys>;
|
|
16
|
+
values?: TVariables;
|
|
17
|
+
} & SuccessErrorNotification;
|
|
18
|
+
export declare type UseDeleteManyReturnType<TData extends BaseRecord = BaseRecord, TError = HttpError, TVariables = {}> = UseMutationResult<DeleteManyResponse<TData>, TError, DeleteManyParams<TVariables>, unknown>;
|
|
19
|
+
export declare type UseDeleteManyProps<TData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}> = {
|
|
20
|
+
mutationOptions?: Omit<UseMutationOptions<DeleteManyResponse<TData>, TError, DeleteManyParams<TVariables>, DeleteContext<TData>>, "mutationFn" | "onError" | "onSuccess" | "onSettled" | "onMutate">;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* `useDeleteMany` is a modified version of `react-query`'s {@link https://react-query.tanstack.com/reference/useMutation `useMutation`} for multiple delete mutations.
|
|
24
|
+
*
|
|
25
|
+
* It uses `deleteMany` method as mutation function from the `dataProvider` which is passed to `<Refine>`.
|
|
26
|
+
*
|
|
27
|
+
* @see {@link https://refine.dev/docs/core/hooks/data/useDeleteMany} for more details.
|
|
28
|
+
*
|
|
29
|
+
* @typeParam TData - Result data of the query extends {@link https://refine.dev/docs/core/interfaceReferences#baserecord `BaseRecord`}
|
|
30
|
+
* @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/core/interfaceReferences#httperror `HttpError`}
|
|
31
|
+
* @typeParam TVariables - Values for params. default `{}`
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
export declare const useDeleteMany: <TData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}>({ mutationOptions, }?: UseDeleteManyProps<TData, TError, TVariables>) => UseDeleteManyReturnType<TData, TError, TVariables>;
|
|
35
|
+
//# sourceMappingURL=useDeleteMany.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDeleteMany.d.ts","sourceRoot":"","sources":["../../../src/hooks/data/useDeleteMany.ts"],"names":[],"mappings":"AAAA,OAAO,EAGH,iBAAiB,EACjB,kBAAkB,EACrB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EACH,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,OAAO,EACP,YAAY,EAGZ,WAAW,IAAI,aAAa,EAC5B,wBAAwB,EACxB,SAAS,EACT,UAAU,EACb,MAAM,kBAAkB,CAAC;AAsB1B,oBAAY,gBAAgB,CAAC,UAAU,IAAI;IACvC,GAAG,EAAE,OAAO,EAAE,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;IAChD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,UAAU,CAAC,CAAC;IACtC,MAAM,CAAC,EAAE,UAAU,CAAC;CACvB,GAAG,wBAAwB,CAAC;AAE7B,oBAAY,uBAAuB,CAC/B,KAAK,SAAS,UAAU,GAAG,UAAU,EACrC,MAAM,GAAG,SAAS,EAClB,UAAU,GAAG,EAAE,IACf,iBAAiB,CACjB,kBAAkB,CAAC,KAAK,CAAC,EACzB,MAAM,EACN,gBAAgB,CAAC,UAAU,CAAC,EAC5B,OAAO,CACV,CAAC;AAEF,oBAAY,kBAAkB,CAC1B,KAAK,SAAS,UAAU,GAAG,UAAU,EACrC,MAAM,SAAS,SAAS,GAAG,SAAS,EACpC,UAAU,GAAG,EAAE,IACf;IACA,eAAe,CAAC,EAAE,IAAI,CAClB,kBAAkB,CACd,kBAAkB,CAAC,KAAK,CAAC,EACzB,MAAM,EACN,gBAAgB,CAAC,UAAU,CAAC,EAC5B,aAAa,CAAC,KAAK,CAAC,CACvB,EACD,YAAY,GAAG,SAAS,GAAG,WAAW,GAAG,WAAW,GAAG,UAAU,CACpE,CAAC;CACL,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,aAAa,4NAwVzB,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { UseInfiniteQueryOptions, InfiniteQueryObserverResult } from "@tanstack/react-query";
|
|
2
|
+
import { CrudFilters, Pagination, BaseRecord, HttpError, CrudSorting, MetaQuery, SuccessErrorNotification, LiveModeProps, GetListResponse } from "../../interfaces";
|
|
3
|
+
export interface UseInfiniteListConfig {
|
|
4
|
+
pagination?: Pagination;
|
|
5
|
+
hasPagination?: boolean;
|
|
6
|
+
sort?: CrudSorting;
|
|
7
|
+
filters?: CrudFilters;
|
|
8
|
+
}
|
|
9
|
+
export declare type UseInfiniteListProps<TData, TError> = {
|
|
10
|
+
/**
|
|
11
|
+
* Resource name for API data interactions
|
|
12
|
+
*/
|
|
13
|
+
resource: string;
|
|
14
|
+
/**
|
|
15
|
+
* Configuration for pagination, sorting and filtering
|
|
16
|
+
* @type [`useInfiniteListConfig`](/docs/api-reference/core/hooks/data/useInfiniteList/#config-parameters)
|
|
17
|
+
* @deprecated `config` property is deprecated. Use `pagination`, `hasPagination`, `sorters` and `filters` instead.
|
|
18
|
+
*/
|
|
19
|
+
config?: UseInfiniteListConfig;
|
|
20
|
+
/**
|
|
21
|
+
* Pagination properties
|
|
22
|
+
*/
|
|
23
|
+
pagination?: Pagination;
|
|
24
|
+
/**
|
|
25
|
+
* Whether to use server-side pagination or not
|
|
26
|
+
* @deprecated `hasPagination` property is deprecated. Use `pagination.mode` instead.
|
|
27
|
+
*/
|
|
28
|
+
hasPagination?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Sorter parameters
|
|
31
|
+
*/
|
|
32
|
+
sorters?: CrudSorting;
|
|
33
|
+
/**
|
|
34
|
+
* Filter parameters
|
|
35
|
+
*/
|
|
36
|
+
filters?: CrudFilters;
|
|
37
|
+
/**
|
|
38
|
+
* Tanstack Query's [useInfiniteQuery](https://tanstack.com/query/v4/docs/react/reference/useInfiniteQuery) options
|
|
39
|
+
*/
|
|
40
|
+
queryOptions?: UseInfiniteQueryOptions<GetListResponse<TData>, TError>;
|
|
41
|
+
/**
|
|
42
|
+
* Metadata query for `dataProvider`
|
|
43
|
+
*/
|
|
44
|
+
meta?: MetaQuery;
|
|
45
|
+
/**
|
|
46
|
+
* Metadata query for `dataProvider`
|
|
47
|
+
* @deprecated `metaData` is deprecated with refine@4, refine will pass `meta` instead, however, we still support `metaData` for backward compatibility.
|
|
48
|
+
*/
|
|
49
|
+
metaData?: MetaQuery;
|
|
50
|
+
/**
|
|
51
|
+
* If there is more than one `dataProvider`, you should use the `dataProviderName` that you will use
|
|
52
|
+
*/
|
|
53
|
+
dataProviderName?: string;
|
|
54
|
+
} & SuccessErrorNotification & LiveModeProps;
|
|
55
|
+
/**
|
|
56
|
+
* `useInfiniteList` is a modified version of `react-query`'s {@link https://tanstack.com/query/latest/docs/react/guides/infinite-queries `useInfiniteQuery`} used for retrieving items from a `resource` with pagination, sort, and filter configurations.
|
|
57
|
+
*
|
|
58
|
+
* It uses the `getList` method as the query function from the `dataProvider` which is passed to `<Refine>`.
|
|
59
|
+
*
|
|
60
|
+
* @see {@link https://refine.dev/docs/core/hooks/data/useInfiniteList} for more details.
|
|
61
|
+
*
|
|
62
|
+
* @typeParam TData - Result data of the query extends {@link https://refine.dev/docs/core/interfaceReferences#baserecord `BaseRecord`}
|
|
63
|
+
* @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/core/interfaceReferences#httperror `HttpError`}
|
|
64
|
+
*
|
|
65
|
+
*/
|
|
66
|
+
export declare const useInfiniteList: <TData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError>({ resource, config, filters, hasPagination, pagination, sorters, queryOptions, successNotification, errorNotification, meta, metaData, liveMode, onLiveEvent, liveParams, dataProviderName, }: UseInfiniteListProps<TData, TError>) => InfiniteQueryObserverResult<GetListResponse<TData>, TError>;
|
|
67
|
+
//# sourceMappingURL=useInfiniteList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInfiniteList.d.ts","sourceRoot":"","sources":["../../../src/hooks/data/useInfiniteList.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,uBAAuB,EACvB,2BAA2B,EAC9B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACH,WAAW,EACX,UAAU,EACV,UAAU,EACV,SAAS,EACT,WAAW,EACX,SAAS,EACT,wBAAwB,EACxB,aAAa,EACb,eAAe,EAClB,MAAM,kBAAkB,CAAC;AAmB1B,MAAM,WAAW,qBAAqB;IAClC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,OAAO,CAAC,EAAE,WAAW,CAAC;CACzB;AAED,oBAAY,oBAAoB,CAAC,KAAK,EAAE,MAAM,IAAI;IAC9C;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;OAEG;IACH,YAAY,CAAC,EAAE,uBAAuB,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC;IACvE;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B,GAAG,wBAAwB,GACxB,aAAa,CAAC;AAElB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,kXA6L3B,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { QueryObserverResult, UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { GetListResponse, CrudFilters, Pagination, BaseRecord, HttpError, CrudSorting, MetaQuery, SuccessErrorNotification, LiveModeProps } from "../../interfaces";
|
|
3
|
+
export interface UseListConfig {
|
|
4
|
+
pagination?: Pagination;
|
|
5
|
+
hasPagination?: boolean;
|
|
6
|
+
sort?: CrudSorting;
|
|
7
|
+
filters?: CrudFilters;
|
|
8
|
+
}
|
|
9
|
+
export declare type UseListProps<TData, TError> = {
|
|
10
|
+
/**
|
|
11
|
+
* Resource name for API data interactions
|
|
12
|
+
*/
|
|
13
|
+
resource?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Configuration for pagination, sorting and filtering
|
|
16
|
+
* @type [`UseListConfig`](/docs/api-reference/core/hooks/data/useList/#config-parameters)
|
|
17
|
+
* @deprecated `config` property is deprecated. Use `pagination`, `hasPagination`, `sorters` and `filters` instead.
|
|
18
|
+
*/
|
|
19
|
+
config?: UseListConfig;
|
|
20
|
+
/**
|
|
21
|
+
* Pagination properties
|
|
22
|
+
*/
|
|
23
|
+
pagination?: Pagination;
|
|
24
|
+
/**
|
|
25
|
+
* Whether to use server-side pagination or not
|
|
26
|
+
* @deprecated `hasPagination` property is deprecated. Use `pagination.mode` instead.
|
|
27
|
+
*/
|
|
28
|
+
hasPagination?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Sorter parameters
|
|
31
|
+
*/
|
|
32
|
+
sorters?: CrudSorting;
|
|
33
|
+
/**
|
|
34
|
+
* Filter parameters
|
|
35
|
+
*/
|
|
36
|
+
filters?: CrudFilters;
|
|
37
|
+
/**
|
|
38
|
+
* Tanstack Query's [useQuery](https://tanstack.com/query/v4/docs/reference/useQuery) options
|
|
39
|
+
*/
|
|
40
|
+
queryOptions?: UseQueryOptions<GetListResponse<TData>, TError>;
|
|
41
|
+
/**
|
|
42
|
+
* Meta data query for `dataProvider`
|
|
43
|
+
*/
|
|
44
|
+
meta?: MetaQuery;
|
|
45
|
+
/**
|
|
46
|
+
* Meta data query for `dataProvider`
|
|
47
|
+
* @deprecated `metaData` is deprecated with refine@4, refine will pass `meta` instead, however, we still support `metaData` for backward compatibility.
|
|
48
|
+
*/
|
|
49
|
+
metaData?: MetaQuery;
|
|
50
|
+
/**
|
|
51
|
+
* If there is more than one `dataProvider`, you should use the `dataProviderName` that you will use
|
|
52
|
+
*/
|
|
53
|
+
dataProviderName?: string;
|
|
54
|
+
} & SuccessErrorNotification & LiveModeProps;
|
|
55
|
+
/**
|
|
56
|
+
* `useList` is a modified version of `react-query`'s {@link https://react-query.tanstack.com/guides/queries `useQuery`} used for retrieving items from a `resource` with pagination, sort, and filter configurations.
|
|
57
|
+
*
|
|
58
|
+
* It uses the `getList` method as the query function from the `dataProvider` which is passed to `<Refine>`.
|
|
59
|
+
*
|
|
60
|
+
* @see {@link https://refine.dev/docs/core/hooks/data/useList} for more details.
|
|
61
|
+
*
|
|
62
|
+
* @typeParam TData - Result data of the query extends {@link https://refine.dev/docs/core/interfaceReferences#baserecord `BaseRecord`}
|
|
63
|
+
* @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/core/interfaceReferences#httperror `HttpError`}
|
|
64
|
+
*
|
|
65
|
+
*/
|
|
66
|
+
export declare const useList: <TData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError>({ resource, config, filters, hasPagination, pagination, sorters, queryOptions, successNotification, errorNotification, meta, metaData, liveMode, onLiveEvent, liveParams, dataProviderName, }: UseListProps<TData, TError>) => QueryObserverResult<GetListResponse<TData>, TError>;
|
|
67
|
+
//# sourceMappingURL=useList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useList.d.ts","sourceRoot":"","sources":["../../../src/hooks/data/useList.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,mBAAmB,EAEnB,eAAe,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACH,eAAe,EACf,WAAW,EACX,UAAU,EACV,UAAU,EACV,SAAS,EACT,WAAW,EACX,SAAS,EACT,wBAAwB,EACxB,aAAa,EAChB,MAAM,kBAAkB,CAAC;AAiB1B,MAAM,WAAW,aAAa;IAC1B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,OAAO,CAAC,EAAE,WAAW,CAAC;CACzB;AAED,oBAAY,YAAY,CAAC,KAAK,EAAE,MAAM,IAAI;IACtC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;OAEG;IACH,YAAY,CAAC,EAAE,eAAe,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC;IAC/D;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B,GAAG,wBAAwB,GACxB,aAAa,CAAC;AAElB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,OAAO,kWAyMnB,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { QueryObserverResult, UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { BaseRecord, BaseKey, GetManyResponse, HttpError, LiveModeProps, SuccessErrorNotification, MetaQuery } from "../../interfaces";
|
|
3
|
+
export declare type UseManyProps<TData, TError> = {
|
|
4
|
+
/**
|
|
5
|
+
* Resource name for API data interactions
|
|
6
|
+
*/
|
|
7
|
+
resource: string;
|
|
8
|
+
/**
|
|
9
|
+
* ids of the item in the resource
|
|
10
|
+
* @type [`BaseKey[]`](/docs/api-reference/core/interfaceReferences/#basekey)
|
|
11
|
+
*/
|
|
12
|
+
ids: BaseKey[];
|
|
13
|
+
/**
|
|
14
|
+
* react-query's [useQuery](https://tanstack.com/query/v4/docs/reference/useQuery) options
|
|
15
|
+
*/
|
|
16
|
+
queryOptions?: UseQueryOptions<GetManyResponse<TData>, TError>;
|
|
17
|
+
/**
|
|
18
|
+
* Metadata query for `dataProvider`,
|
|
19
|
+
*/
|
|
20
|
+
meta?: MetaQuery;
|
|
21
|
+
/**
|
|
22
|
+
* Metadata query for `dataProvider`,
|
|
23
|
+
* @deprecated `metaData` is deprecated with refine@4, refine will pass `meta` instead, however, we still support `metaData` for backward compatibility.
|
|
24
|
+
*/
|
|
25
|
+
metaData?: MetaQuery;
|
|
26
|
+
/**
|
|
27
|
+
* If there is more than one `dataProvider`, you should use the `dataProviderName` that you will use.
|
|
28
|
+
* @default "default"
|
|
29
|
+
*/
|
|
30
|
+
dataProviderName?: string;
|
|
31
|
+
} & SuccessErrorNotification & LiveModeProps;
|
|
32
|
+
/**
|
|
33
|
+
* `useMany` is a modified version of `react-query`'s {@link https://react-query.tanstack.com/guides/queries `useQuery`} used for retrieving multiple items from a `resource`.
|
|
34
|
+
*
|
|
35
|
+
* It uses `getMany` method as query function from the `dataProvider` which is passed to `<Refine>`.
|
|
36
|
+
*
|
|
37
|
+
* @see {@link https://refine.dev/docs/core/hooks/data/useMany} for more details.
|
|
38
|
+
*
|
|
39
|
+
* @typeParam TData - Result data of the query extends {@link https://refine.dev/docs/core/interfaceReferences#baserecord `BaseRecord`}
|
|
40
|
+
* @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/core/interfaceReferences#httperror `HttpError`}
|
|
41
|
+
*
|
|
42
|
+
*/
|
|
43
|
+
export declare const useMany: <TData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError>({ resource, ids, queryOptions, successNotification, errorNotification, meta, metaData, liveMode, onLiveEvent, liveParams, dataProviderName, }: UseManyProps<TData, TError>) => QueryObserverResult<GetManyResponse<TData>, unknown>;
|
|
44
|
+
//# sourceMappingURL=useMany.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMany.d.ts","sourceRoot":"","sources":["../../../src/hooks/data/useMany.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,mBAAmB,EAEnB,eAAe,EAClB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACH,UAAU,EACV,OAAO,EACP,eAAe,EACf,SAAS,EACT,aAAa,EACb,wBAAwB,EACxB,SAAS,EACZ,MAAM,kBAAkB,CAAC;AAiB1B,oBAAY,YAAY,CAAC,KAAK,EAAE,MAAM,IAAI;IACtC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,GAAG,EAAE,OAAO,EAAE,CAAC;IACf;;OAEG;IACH,YAAY,CAAC,EAAE,eAAe,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC;IAC/D;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B,GAAG,wBAAwB,GACxB,aAAa,CAAC;AAElB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,OAAO,mTAgInB,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { QueryObserverResult, UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { GetOneResponse, HttpError, BaseRecord, BaseKey, LiveModeProps, SuccessErrorNotification, MetaQuery } from "../../interfaces";
|
|
3
|
+
export declare type UseOneProps<TData, TError> = {
|
|
4
|
+
/**
|
|
5
|
+
* Resource name for API data interactions
|
|
6
|
+
*/
|
|
7
|
+
resource?: string;
|
|
8
|
+
/**
|
|
9
|
+
* id of the item in the resource
|
|
10
|
+
* @type [`BaseKey`](/docs/api-reference/core/interfaceReferences/#basekey)
|
|
11
|
+
*/
|
|
12
|
+
id?: BaseKey;
|
|
13
|
+
/**
|
|
14
|
+
* react-query's [useQuery](https://tanstack.com/query/v4/docs/reference/useQuery) options
|
|
15
|
+
*/
|
|
16
|
+
queryOptions?: UseQueryOptions<GetOneResponse<TData>, TError>;
|
|
17
|
+
/**
|
|
18
|
+
* Metadata query for `dataProvider`,
|
|
19
|
+
*/
|
|
20
|
+
meta?: MetaQuery;
|
|
21
|
+
/**
|
|
22
|
+
* Meta data query for `dataProvider`,
|
|
23
|
+
* @deprecated `metaData` is deprecated with refine@4, refine will pass `meta` instead, however, we still support `metaData` for backward compatibility.
|
|
24
|
+
*/
|
|
25
|
+
metaData?: MetaQuery;
|
|
26
|
+
/**
|
|
27
|
+
* If there is more than one `dataProvider`, you should use the `dataProviderName` that you will use.
|
|
28
|
+
* @default `"default"``
|
|
29
|
+
*/
|
|
30
|
+
dataProviderName?: string;
|
|
31
|
+
} & SuccessErrorNotification & LiveModeProps;
|
|
32
|
+
/**
|
|
33
|
+
* `useOne` is a modified version of `react-query`'s {@link https://react-query.tanstack.com/guides/queries `useQuery`} used for retrieving single items from a `resource`.
|
|
34
|
+
*
|
|
35
|
+
* It uses `getOne` method as query function from the `dataProvider` which is passed to `<Refine>`.
|
|
36
|
+
*
|
|
37
|
+
* @see {@link https://refine.dev/docs/core/hooks/data/useOne} for more details.
|
|
38
|
+
*
|
|
39
|
+
* @typeParam TData - Result data of the query extends {@link https://refine.dev/docs/api-references/interfaceReferences#baserecord `BaseRecord`}
|
|
40
|
+
* @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/api-references/interfaceReferences#httperror `HttpError`}
|
|
41
|
+
*
|
|
42
|
+
*/
|
|
43
|
+
export declare const useOne: <TData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError>({ resource, id, queryOptions, successNotification, errorNotification, meta, metaData, liveMode, onLiveEvent, liveParams, dataProviderName, }: UseOneProps<TData, TError>) => QueryObserverResult<GetOneResponse<TData>, unknown>;
|
|
44
|
+
//# sourceMappingURL=useOne.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOne.d.ts","sourceRoot":"","sources":["../../../src/hooks/data/useOne.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,mBAAmB,EAEnB,eAAe,EAClB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACH,cAAc,EACd,SAAS,EACT,UAAU,EACV,OAAO,EACP,aAAa,EACb,wBAAwB,EACxB,SAAS,EACZ,MAAM,kBAAkB,CAAC;AAgB1B,oBAAY,WAAW,CAAC,KAAK,EAAE,MAAM,IAAI;IACrC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,EAAE,CAAC,EAAE,OAAO,CAAC;IACb;;OAEG;IACH,YAAY,CAAC,EAAE,eAAe,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC;IAC9D;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B,GAAG,wBAAwB,GACxB,aAAa,CAAC;AAElB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,MAAM,gTAoIlB,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { UseMutationOptions, UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import { BaseRecord, BaseKey, UpdateResponse, MutationMode, PrevContext as UpdateContext, HttpError, SuccessErrorNotification, MetaQuery, IQueryKeys } from "../../interfaces";
|
|
3
|
+
export declare type UpdateParams<TVariables> = {
|
|
4
|
+
/**
|
|
5
|
+
* Resource name for API data interactions
|
|
6
|
+
*/
|
|
7
|
+
resource: string;
|
|
8
|
+
/**
|
|
9
|
+
* id for mutation function
|
|
10
|
+
*/
|
|
11
|
+
id: BaseKey;
|
|
12
|
+
/**
|
|
13
|
+
* [Determines when mutations are executed](/advanced-tutorials/mutation-mode.md)
|
|
14
|
+
*/
|
|
15
|
+
mutationMode?: MutationMode;
|
|
16
|
+
/**
|
|
17
|
+
* Duration to wait before executing the mutation when `mutationMode = "undoable"`
|
|
18
|
+
*/
|
|
19
|
+
undoableTimeout?: number;
|
|
20
|
+
/**
|
|
21
|
+
* Callback that runs when undo button is clicked on `mutationMode = "undoable"`
|
|
22
|
+
*/
|
|
23
|
+
onCancel?: (cancelMutation: () => void) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Values for mutation function
|
|
26
|
+
*/
|
|
27
|
+
values: TVariables;
|
|
28
|
+
/**
|
|
29
|
+
* Metadata query for dataProvider
|
|
30
|
+
*/
|
|
31
|
+
meta?: MetaQuery;
|
|
32
|
+
/**
|
|
33
|
+
* Metadata query for dataProvider
|
|
34
|
+
* @deprecated `metaData` is deprecated with refine@4, refine will pass `meta` instead, however, we still support `metaData` for backward compatibility.
|
|
35
|
+
*/
|
|
36
|
+
metaData?: MetaQuery;
|
|
37
|
+
/**
|
|
38
|
+
* If there is more than one `dataProvider`, you should use the `dataProviderName` that you will use.
|
|
39
|
+
* @default "default"
|
|
40
|
+
*/
|
|
41
|
+
dataProviderName?: string;
|
|
42
|
+
/**
|
|
43
|
+
* You can use it to manage the invalidations that will occur at the end of the mutation.
|
|
44
|
+
*/
|
|
45
|
+
invalidates?: Array<keyof IQueryKeys>;
|
|
46
|
+
} & SuccessErrorNotification;
|
|
47
|
+
export declare type UseUpdateReturnType<TData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}> = UseMutationResult<UpdateResponse<TData>, TError, UpdateParams<TVariables>, UpdateContext<TData>>;
|
|
48
|
+
export declare type UseUpdateProps<TData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}> = {
|
|
49
|
+
mutationOptions?: Omit<UseMutationOptions<UpdateResponse<TData>, TError, UpdateParams<TVariables>, UpdateContext<TData>>, "mutationFn" | "onError" | "onSuccess" | "onSettled" | "onMutate">;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* `useUpdate` is a modified version of `react-query`'s {@link https://react-query.tanstack.com/reference/useMutation `useMutation`} for update mutations.
|
|
53
|
+
*
|
|
54
|
+
* It uses `update` method as mutation function from the `dataProvider` which is passed to `<Refine>`.
|
|
55
|
+
*
|
|
56
|
+
* @see {@link https://refine.dev/docs/api-references/hooks/data/useUpdate} for more details.
|
|
57
|
+
*
|
|
58
|
+
* @typeParam TData - Result data of the query extends {@link https://refine.dev/docs/api-references/interfaceReferences#baserecord `BaseRecord`}
|
|
59
|
+
* @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/api-references/interfaceReferences#httperror `HttpError`}
|
|
60
|
+
* @typeParam TVariables - Values for mutation function
|
|
61
|
+
*
|
|
62
|
+
*/
|
|
63
|
+
export declare const useUpdate: <TData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}>({ mutationOptions, }?: UseUpdateProps<TData, TError, TVariables>) => UseUpdateReturnType<TData, TError, TVariables>;
|
|
64
|
+
//# sourceMappingURL=useUpdate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUpdate.d.ts","sourceRoot":"","sources":["../../../src/hooks/data/useUpdate.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,kBAAkB,EAClB,iBAAiB,EAEpB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EACH,UAAU,EACV,OAAO,EACP,cAAc,EACd,YAAY,EACZ,WAAW,IAAI,aAAa,EAC5B,SAAS,EACT,wBAAwB,EACxB,SAAS,EAGT,UAAU,EACb,MAAM,kBAAkB,CAAC;AAqB1B,oBAAY,YAAY,CAAC,UAAU,IAAI;IACnC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,EAAE,EAAE,OAAO,CAAC;IACZ;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;IAChD;;OAEG;IACH,MAAM,EAAE,UAAU,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,UAAU,CAAC,CAAC;CACzC,GAAG,wBAAwB,CAAC;AAE7B,oBAAY,mBAAmB,CAC3B,KAAK,SAAS,UAAU,GAAG,UAAU,EACrC,MAAM,SAAS,SAAS,GAAG,SAAS,EACpC,UAAU,GAAG,EAAE,IACf,iBAAiB,CACjB,cAAc,CAAC,KAAK,CAAC,EACrB,MAAM,EACN,YAAY,CAAC,UAAU,CAAC,EACxB,aAAa,CAAC,KAAK,CAAC,CACvB,CAAC;AAEF,oBAAY,cAAc,CACtB,KAAK,SAAS,UAAU,GAAG,UAAU,EACrC,MAAM,SAAS,SAAS,GAAG,SAAS,EACpC,UAAU,GAAG,EAAE,IACf;IACA,eAAe,CAAC,EAAE,IAAI,CAClB,kBAAkB,CACd,cAAc,CAAC,KAAK,CAAC,EACrB,MAAM,EACN,YAAY,CAAC,UAAU,CAAC,EACxB,aAAa,CAAC,KAAK,CAAC,CACvB,EACD,YAAY,GAAG,SAAS,GAAG,WAAW,GAAG,WAAW,GAAG,UAAU,CACpE,CAAC;CACL,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,SAAS,oNA0WrB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { UseMutationOptions, UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import { BaseRecord, BaseKey, UpdateManyResponse, HttpError, MutationMode, PrevContext as UpdateContext, SuccessErrorNotification, MetaQuery, IQueryKeys } from "../../interfaces";
|
|
3
|
+
declare type UpdateManyParams<TVariables> = {
|
|
4
|
+
ids: BaseKey[];
|
|
5
|
+
resource: string;
|
|
6
|
+
mutationMode?: MutationMode;
|
|
7
|
+
undoableTimeout?: number;
|
|
8
|
+
onCancel?: (cancelMutation: () => void) => void;
|
|
9
|
+
values: TVariables;
|
|
10
|
+
/**
|
|
11
|
+
* meta data for `dataProvider`
|
|
12
|
+
*/
|
|
13
|
+
meta?: MetaQuery;
|
|
14
|
+
/**
|
|
15
|
+
* meta data for `dataProvider`
|
|
16
|
+
* @deprecated `metaData` is deprecated with refine@4, refine will pass `meta` instead, however, we still support `metaData` for backward compatibility.
|
|
17
|
+
*/
|
|
18
|
+
metaData?: MetaQuery;
|
|
19
|
+
dataProviderName?: string;
|
|
20
|
+
invalidates?: Array<keyof IQueryKeys>;
|
|
21
|
+
} & SuccessErrorNotification;
|
|
22
|
+
declare type UseUpdateManyReturnType<TData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}> = UseMutationResult<UpdateManyResponse<TData>, TError, UpdateManyParams<TVariables>, UpdateContext<TData>>;
|
|
23
|
+
export declare type UseUpdateManyProps<TData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}> = {
|
|
24
|
+
mutationOptions?: Omit<UseMutationOptions<UpdateManyResponse<TData>, TError, UpdateManyParams<TVariables>, UpdateContext<TData>>, "mutationFn" | "onError" | "onSuccess" | "onSettled" | "onMutate">;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* `useUpdateMany` is a modified version of `react-query`'s {@link https://react-query.tanstack.com/reference/useMutation `useMutation`} for multiple update mutations.
|
|
28
|
+
*
|
|
29
|
+
* It uses `updateMany` method as mutation function from the `dataProvider` which is passed to `<Refine>`.
|
|
30
|
+
*
|
|
31
|
+
* @see {@link https://refine.dev/docs/core/hooks/data/useUpdateMany} for more details.
|
|
32
|
+
*
|
|
33
|
+
* @typeParam TData - Result data of the query extends {@link https://refine.dev/docs/core/interfaceReferences#baserecord `BaseRecord`}
|
|
34
|
+
* @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/core/interfaceReferences#httperror `HttpError`}
|
|
35
|
+
* @typeParam TVariables - Values for mutation function
|
|
36
|
+
*
|
|
37
|
+
*/
|
|
38
|
+
export declare const useUpdateMany: <TData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}>({ mutationOptions, }?: UseUpdateManyProps<TData, TError, TVariables>) => UseUpdateManyReturnType<TData, TError, TVariables>;
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=useUpdateMany.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUpdateMany.d.ts","sourceRoot":"","sources":["../../../src/hooks/data/useUpdateMany.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,kBAAkB,EAClB,iBAAiB,EAEpB,MAAM,uBAAuB,CAAC;AAgB/B,OAAO,EACH,UAAU,EACV,OAAO,EACP,kBAAkB,EAClB,SAAS,EACT,YAAY,EAEZ,WAAW,IAAI,aAAa,EAC5B,wBAAwB,EACxB,SAAS,EAET,UAAU,EACb,MAAM,kBAAkB,CAAC;AAS1B,aAAK,gBAAgB,CAAC,UAAU,IAAI;IAChC,GAAG,EAAE,OAAO,EAAE,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;IAChD,MAAM,EAAE,UAAU,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,UAAU,CAAC,CAAC;CACzC,GAAG,wBAAwB,CAAC;AAE7B,aAAK,uBAAuB,CACxB,KAAK,SAAS,UAAU,GAAG,UAAU,EACrC,MAAM,SAAS,SAAS,GAAG,SAAS,EACpC,UAAU,GAAG,EAAE,IACf,iBAAiB,CACjB,kBAAkB,CAAC,KAAK,CAAC,EACzB,MAAM,EACN,gBAAgB,CAAC,UAAU,CAAC,EAC5B,aAAa,CAAC,KAAK,CAAC,CACvB,CAAC;AAEF,oBAAY,kBAAkB,CAC1B,KAAK,SAAS,UAAU,GAAG,UAAU,EACrC,MAAM,SAAS,SAAS,GAAG,SAAS,EACpC,UAAU,GAAG,EAAE,IACf;IACA,eAAe,CAAC,EAAE,IAAI,CAClB,kBAAkB,CACd,kBAAkB,CAAC,KAAK,CAAC,EACzB,MAAM,EACN,gBAAgB,CAAC,UAAU,CAAC,EAC5B,aAAa,CAAC,KAAK,CAAC,CACvB,EACD,YAAY,GAAG,SAAS,GAAG,WAAW,GAAG,WAAW,GAAG,UAAU,CACpE,CAAC;CACL,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,aAAa,4NA0YzB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Hook that memoizes the given dependency array and checks the consecutive calls with deep equality and returns the same value as the first call if dependencies are not changed.
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare const useDeepMemo: <T>(fn: () => T, dependencies: React.DependencyList) => T;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/deepMemo/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAGvC;;;GAGG;AACH,eAAO,MAAM,WAAW,2DASvB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { MouseEventHandler } from "react";
|
|
2
|
+
export interface LabelKeyObject {
|
|
3
|
+
label: string;
|
|
4
|
+
key: string;
|
|
5
|
+
}
|
|
6
|
+
export declare type Data = object[];
|
|
7
|
+
export declare type Headers = LabelKeyObject[] | string[];
|
|
8
|
+
export declare type SyncClickHandler = (event: MouseEventHandler<HTMLAnchorElement>) => boolean | void;
|
|
9
|
+
export declare type AsyncClickHandler = (event: MouseEventHandler<HTMLAnchorElement>, done: (proceed?: boolean) => void) => void;
|
|
10
|
+
export interface CSVDownloadProps {
|
|
11
|
+
data: string | Data;
|
|
12
|
+
headers?: Headers;
|
|
13
|
+
enclosingCharacter?: string;
|
|
14
|
+
separator?: string;
|
|
15
|
+
filename?: string;
|
|
16
|
+
uFEFF?: boolean;
|
|
17
|
+
onClick?: SyncClickHandler | AsyncClickHandler;
|
|
18
|
+
asyncOnClick?: boolean;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=csvDownload.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"csvDownload.interface.d.ts","sourceRoot":"","sources":["../../../src/hooks/export/csvDownload.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE1C,MAAM,WAAW,cAAc;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACf;AAED,oBAAY,IAAI,GAAG,MAAM,EAAE,CAAC;AAC5B,oBAAY,OAAO,GAAG,cAAc,EAAE,GAAG,MAAM,EAAE,CAAC;AAClD,oBAAY,gBAAgB,GAAG,CAC3B,KAAK,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,KAC1C,OAAO,GAAG,IAAI,CAAC;AACpB,oBAAY,iBAAiB,GAAG,CAC5B,KAAK,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,EAC3C,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,KAAK,IAAI,KAChC,IAAI,CAAC;AAEV,MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,gBAAgB,GAAG,iBAAiB,CAAC;IAC/C,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B"}
|