@refinedev/core 4.44.4 → 4.44.6
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 +58 -0
- package/dist/esm/index.js +5 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/hooks/data/useCreate.d.ts +1 -1
- package/dist/hooks/data/useCreate.d.ts.map +1 -1
- package/dist/hooks/data/useCreateMany.d.ts +1 -1
- package/dist/hooks/data/useCreateMany.d.ts.map +1 -1
- package/dist/hooks/data/useDelete.d.ts +2 -2
- package/dist/hooks/data/useDelete.d.ts.map +1 -1
- package/dist/hooks/data/useDeleteMany.d.ts +2 -2
- package/dist/hooks/data/useDeleteMany.d.ts.map +1 -1
- package/dist/hooks/data/useInfiniteList.d.ts +2 -2
- package/dist/hooks/data/useInfiniteList.d.ts.map +1 -1
- package/dist/hooks/data/useList.d.ts +1 -1
- package/dist/hooks/data/useList.d.ts.map +1 -1
- package/dist/hooks/data/useMany.d.ts +1 -1
- package/dist/hooks/data/useMany.d.ts.map +1 -1
- package/dist/hooks/data/useOne.d.ts +1 -1
- package/dist/hooks/data/useOne.d.ts.map +1 -1
- package/dist/hooks/data/useUpdate.d.ts +1 -1
- package/dist/hooks/data/useUpdate.d.ts.map +1 -1
- package/dist/hooks/data/useUpdateMany.d.ts +1 -1
- package/dist/hooks/data/useUpdateMany.d.ts.map +1 -1
- package/dist/hooks/live/useResourceSubscription/index.d.ts.map +1 -1
- package/dist/iife/index.js +4 -4
- package/dist/iife/index.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/hooks/auditLog/useLog/index.ts +2 -2
- package/src/hooks/data/useCreate.ts +21 -21
- package/src/hooks/data/useCreateMany.ts +17 -17
- package/src/hooks/data/useDelete.ts +25 -25
- package/src/hooks/data/useDeleteMany.ts +29 -29
- package/src/hooks/data/useInfiniteList.ts +26 -27
- package/src/hooks/data/useList.ts +22 -23
- package/src/hooks/data/useMany.ts +19 -20
- package/src/hooks/data/useOne.ts +19 -20
- package/src/hooks/data/useUpdate.ts +29 -29
- package/src/hooks/data/useUpdateMany.ts +25 -25
- package/src/hooks/live/useResourceSubscription/index.ts +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@refinedev/core",
|
|
3
|
-
"version": "4.44.
|
|
3
|
+
"version": "4.44.6",
|
|
4
4
|
"description": "refine is a React-based framework for building internal tools, rapidly. It ships with Ant Design System, an enterprise-level UI toolkit.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -82,7 +82,7 @@ export const useLog = <
|
|
|
82
82
|
} = useGetIdentity({
|
|
83
83
|
v3LegacyAuthProviderCompatible: Boolean(authProvider?.isLegacy),
|
|
84
84
|
queryOptions: {
|
|
85
|
-
enabled: !!auditLogContext,
|
|
85
|
+
enabled: !!auditLogContext?.create,
|
|
86
86
|
},
|
|
87
87
|
});
|
|
88
88
|
|
|
@@ -102,7 +102,7 @@ export const useLog = <
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
let authorData;
|
|
105
|
-
if (isLoading) {
|
|
105
|
+
if (isLoading && !!auditLogContext?.create) {
|
|
106
106
|
authorData = await refetch();
|
|
107
107
|
}
|
|
108
108
|
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useMutation,
|
|
3
|
-
UseMutationOptions,
|
|
4
|
-
UseMutationResult,
|
|
5
|
-
} from "@tanstack/react-query";
|
|
6
|
-
import { getXRay } from "@refinedev/devtools-internal";
|
|
7
1
|
import {
|
|
8
2
|
pickDataProvider,
|
|
9
3
|
pickNotDeprecated,
|
|
10
4
|
useActiveAuthProvider,
|
|
11
5
|
} from "@definitions/helpers";
|
|
12
|
-
|
|
6
|
+
import { getXRay } from "@refinedev/devtools-internal";
|
|
13
7
|
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
IQueryKeys,
|
|
20
|
-
} from "../../interfaces";
|
|
8
|
+
useMutation,
|
|
9
|
+
UseMutationOptions,
|
|
10
|
+
UseMutationResult,
|
|
11
|
+
} from "@tanstack/react-query";
|
|
12
|
+
|
|
21
13
|
import {
|
|
22
|
-
useResource,
|
|
23
|
-
useTranslate,
|
|
24
|
-
usePublish,
|
|
25
|
-
useHandleNotification,
|
|
26
14
|
useDataProvider,
|
|
27
|
-
|
|
15
|
+
useHandleNotification,
|
|
28
16
|
useInvalidate,
|
|
29
|
-
|
|
17
|
+
useLog,
|
|
30
18
|
useMeta,
|
|
19
|
+
useOnError,
|
|
20
|
+
usePublish,
|
|
31
21
|
useRefineContext,
|
|
22
|
+
useResource,
|
|
23
|
+
useTranslate,
|
|
32
24
|
} from "@hooks";
|
|
25
|
+
import { useKeys } from "@hooks/useKeys";
|
|
26
|
+
import {
|
|
27
|
+
BaseRecord,
|
|
28
|
+
CreateResponse,
|
|
29
|
+
HttpError,
|
|
30
|
+
IQueryKeys,
|
|
31
|
+
MetaQuery,
|
|
32
|
+
SuccessErrorNotification,
|
|
33
|
+
} from "../../interfaces";
|
|
33
34
|
import {
|
|
34
35
|
useLoadingOvertime,
|
|
35
36
|
UseLoadingOvertimeOptionsProps,
|
|
36
37
|
UseLoadingOvertimeReturnType,
|
|
37
38
|
} from "../useLoadingOvertime";
|
|
38
|
-
import { useKeys } from "@hooks/useKeys";
|
|
39
39
|
|
|
40
40
|
type useCreateParams<TData, TError, TVariables> = {
|
|
41
41
|
/**
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
+
import { getXRay } from "@refinedev/devtools-internal";
|
|
1
2
|
import {
|
|
2
3
|
useMutation,
|
|
3
4
|
UseMutationOptions,
|
|
4
5
|
UseMutationResult,
|
|
5
6
|
} from "@tanstack/react-query";
|
|
6
|
-
import { getXRay } from "@refinedev/devtools-internal";
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
MetaQuery,
|
|
14
|
-
IQueryKeys,
|
|
15
|
-
} from "../../interfaces";
|
|
9
|
+
handleMultiple,
|
|
10
|
+
pickDataProvider,
|
|
11
|
+
pickNotDeprecated,
|
|
12
|
+
} from "@definitions";
|
|
16
13
|
import {
|
|
17
|
-
useResource,
|
|
18
|
-
useTranslate,
|
|
19
|
-
usePublish,
|
|
20
|
-
useHandleNotification,
|
|
21
14
|
useDataProvider,
|
|
15
|
+
useHandleNotification,
|
|
22
16
|
useInvalidate,
|
|
23
17
|
useLog,
|
|
24
18
|
useMeta,
|
|
19
|
+
usePublish,
|
|
25
20
|
useRefineContext,
|
|
21
|
+
useResource,
|
|
22
|
+
useTranslate,
|
|
26
23
|
} from "@hooks";
|
|
24
|
+
import { useKeys } from "@hooks/useKeys";
|
|
27
25
|
import {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
BaseRecord,
|
|
27
|
+
CreateManyResponse,
|
|
28
|
+
HttpError,
|
|
29
|
+
IQueryKeys,
|
|
30
|
+
MetaQuery,
|
|
31
|
+
SuccessErrorNotification,
|
|
32
|
+
} from "../../interfaces";
|
|
32
33
|
import {
|
|
33
34
|
useLoadingOvertime,
|
|
34
35
|
UseLoadingOvertimeOptionsProps,
|
|
35
36
|
UseLoadingOvertimeReturnType,
|
|
36
37
|
} from "../useLoadingOvertime";
|
|
37
|
-
import { useKeys } from "@hooks/useKeys";
|
|
38
38
|
|
|
39
39
|
type useCreateManyParams<TData, TError, TVariables> = {
|
|
40
40
|
resource: string;
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
+
import { getXRay } from "@refinedev/devtools-internal";
|
|
1
2
|
import {
|
|
2
|
-
useQueryClient,
|
|
3
3
|
useMutation,
|
|
4
|
-
UseMutationResult,
|
|
5
4
|
UseMutationOptions,
|
|
5
|
+
UseMutationResult,
|
|
6
|
+
useQueryClient,
|
|
6
7
|
} from "@tanstack/react-query";
|
|
7
|
-
import { getXRay } from "@refinedev/devtools-internal";
|
|
8
8
|
|
|
9
|
+
import { ActionTypes } from "@contexts/undoableQueue";
|
|
10
|
+
import {
|
|
11
|
+
pickDataProvider,
|
|
12
|
+
pickNotDeprecated,
|
|
13
|
+
queryKeysReplacement,
|
|
14
|
+
useActiveAuthProvider,
|
|
15
|
+
} from "@definitions/helpers";
|
|
9
16
|
import {
|
|
10
|
-
useResource,
|
|
11
|
-
useMutationMode,
|
|
12
17
|
useCancelNotification,
|
|
13
|
-
useTranslate,
|
|
14
|
-
usePublish,
|
|
15
|
-
useHandleNotification,
|
|
16
18
|
useDataProvider,
|
|
17
|
-
|
|
19
|
+
useHandleNotification,
|
|
18
20
|
useInvalidate,
|
|
19
|
-
|
|
21
|
+
useLog,
|
|
20
22
|
useMeta,
|
|
23
|
+
useMutationMode,
|
|
24
|
+
useOnError,
|
|
25
|
+
usePublish,
|
|
21
26
|
useRefineContext,
|
|
27
|
+
useResource,
|
|
28
|
+
useTranslate,
|
|
22
29
|
} from "@hooks";
|
|
23
|
-
import {
|
|
30
|
+
import { useKeys } from "@hooks/useKeys";
|
|
24
31
|
import {
|
|
25
|
-
DeleteOneResponse,
|
|
26
|
-
MutationMode,
|
|
27
|
-
PrevContext as DeleteContext,
|
|
28
|
-
BaseRecord,
|
|
29
32
|
BaseKey,
|
|
30
|
-
|
|
33
|
+
BaseRecord,
|
|
34
|
+
DeleteOneResponse,
|
|
31
35
|
GetListResponse,
|
|
32
|
-
|
|
33
|
-
PreviousQuery,
|
|
36
|
+
HttpError,
|
|
34
37
|
IQueryKeys,
|
|
35
38
|
MetaQuery,
|
|
39
|
+
MutationMode,
|
|
40
|
+
PrevContext as DeleteContext,
|
|
41
|
+
PreviousQuery,
|
|
42
|
+
SuccessErrorNotification,
|
|
36
43
|
} from "../../interfaces";
|
|
37
|
-
import {
|
|
38
|
-
queryKeysReplacement,
|
|
39
|
-
pickDataProvider,
|
|
40
|
-
pickNotDeprecated,
|
|
41
|
-
useActiveAuthProvider,
|
|
42
|
-
} from "@definitions/helpers";
|
|
43
44
|
import {
|
|
44
45
|
useLoadingOvertime,
|
|
45
46
|
UseLoadingOvertimeOptionsProps,
|
|
46
47
|
UseLoadingOvertimeReturnType,
|
|
47
48
|
} from "../useLoadingOvertime";
|
|
48
|
-
import { useKeys } from "@hooks/useKeys";
|
|
49
49
|
|
|
50
50
|
export type DeleteParams<TData, TError, TVariables> = {
|
|
51
51
|
/**
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
+
import { getXRay } from "@refinedev/devtools-internal";
|
|
1
2
|
import {
|
|
2
|
-
useQueryClient,
|
|
3
3
|
useMutation,
|
|
4
|
-
UseMutationResult,
|
|
5
4
|
UseMutationOptions,
|
|
5
|
+
UseMutationResult,
|
|
6
|
+
useQueryClient,
|
|
6
7
|
} from "@tanstack/react-query";
|
|
7
|
-
import { getXRay } from "@refinedev/devtools-internal";
|
|
8
8
|
|
|
9
|
+
import { ActionTypes } from "@contexts/undoableQueue";
|
|
9
10
|
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
GetListResponse,
|
|
17
|
-
PrevContext as DeleteContext,
|
|
18
|
-
SuccessErrorNotification,
|
|
19
|
-
MetaQuery,
|
|
20
|
-
IQueryKeys,
|
|
21
|
-
} from "../../interfaces";
|
|
11
|
+
handleMultiple,
|
|
12
|
+
pickDataProvider,
|
|
13
|
+
pickNotDeprecated,
|
|
14
|
+
queryKeysReplacement,
|
|
15
|
+
useActiveAuthProvider,
|
|
16
|
+
} from "@definitions";
|
|
22
17
|
import {
|
|
23
|
-
useResource,
|
|
24
|
-
useTranslate,
|
|
25
|
-
useMutationMode,
|
|
26
18
|
useCancelNotification,
|
|
27
|
-
usePublish,
|
|
28
|
-
useHandleNotification,
|
|
29
19
|
useDataProvider,
|
|
20
|
+
useHandleNotification,
|
|
30
21
|
useInvalidate,
|
|
31
22
|
useLog,
|
|
32
|
-
useOnError,
|
|
33
23
|
useMeta,
|
|
24
|
+
useMutationMode,
|
|
25
|
+
useOnError,
|
|
26
|
+
usePublish,
|
|
34
27
|
useRefineContext,
|
|
28
|
+
useResource,
|
|
29
|
+
useTranslate,
|
|
35
30
|
} from "@hooks";
|
|
36
|
-
import {
|
|
31
|
+
import { useKeys } from "@hooks/useKeys";
|
|
37
32
|
import {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
33
|
+
BaseKey,
|
|
34
|
+
BaseRecord,
|
|
35
|
+
DeleteManyResponse,
|
|
36
|
+
GetListResponse,
|
|
37
|
+
HttpError,
|
|
38
|
+
IQueryKeys,
|
|
39
|
+
MetaQuery,
|
|
40
|
+
MutationMode,
|
|
41
|
+
PrevContext as DeleteContext,
|
|
42
|
+
PreviousQuery,
|
|
43
|
+
SuccessErrorNotification,
|
|
44
|
+
} from "../../interfaces";
|
|
44
45
|
import {
|
|
45
46
|
useLoadingOvertime,
|
|
46
47
|
UseLoadingOvertimeOptionsProps,
|
|
47
48
|
UseLoadingOvertimeReturnType,
|
|
48
49
|
} from "../useLoadingOvertime";
|
|
49
|
-
import { useKeys } from "@hooks/useKeys";
|
|
50
50
|
|
|
51
51
|
export type DeleteManyParams<TData, TError, TVariables> = {
|
|
52
52
|
/**
|
|
@@ -1,48 +1,47 @@
|
|
|
1
|
+
import { getXRay } from "@refinedev/devtools-internal";
|
|
1
2
|
import {
|
|
3
|
+
InfiniteData,
|
|
4
|
+
InfiniteQueryObserverResult,
|
|
2
5
|
useInfiniteQuery,
|
|
3
6
|
UseInfiniteQueryOptions,
|
|
4
|
-
InfiniteQueryObserverResult,
|
|
5
|
-
InfiniteData,
|
|
6
7
|
} from "@tanstack/react-query";
|
|
7
|
-
import { getXRay } from "@refinedev/devtools-internal";
|
|
8
8
|
|
|
9
9
|
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
LiveModeProps,
|
|
18
|
-
GetListResponse,
|
|
19
|
-
Prettify,
|
|
20
|
-
} from "../../interfaces";
|
|
10
|
+
getNextPageParam,
|
|
11
|
+
getPreviousPageParam,
|
|
12
|
+
handlePaginationParams,
|
|
13
|
+
pickDataProvider,
|
|
14
|
+
pickNotDeprecated,
|
|
15
|
+
useActiveAuthProvider,
|
|
16
|
+
} from "@definitions/helpers";
|
|
21
17
|
import {
|
|
22
|
-
|
|
18
|
+
useDataProvider,
|
|
23
19
|
useHandleNotification,
|
|
20
|
+
useMeta,
|
|
21
|
+
useOnError,
|
|
22
|
+
useResource,
|
|
24
23
|
useResourceSubscription,
|
|
25
24
|
useTranslate,
|
|
26
|
-
useDataProvider,
|
|
27
|
-
useOnError,
|
|
28
|
-
useMeta,
|
|
29
25
|
} from "@hooks";
|
|
30
26
|
import {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
27
|
+
BaseRecord,
|
|
28
|
+
CrudFilters,
|
|
29
|
+
CrudSorting,
|
|
30
|
+
GetListResponse,
|
|
31
|
+
HttpError,
|
|
32
|
+
LiveModeProps,
|
|
33
|
+
MetaQuery,
|
|
34
|
+
Pagination,
|
|
35
|
+
Prettify,
|
|
36
|
+
SuccessErrorNotification,
|
|
37
|
+
} from "../../interfaces";
|
|
39
38
|
|
|
39
|
+
import { useKeys } from "@hooks/useKeys";
|
|
40
40
|
import {
|
|
41
41
|
useLoadingOvertime,
|
|
42
42
|
UseLoadingOvertimeOptionsProps,
|
|
43
43
|
UseLoadingOvertimeReturnType,
|
|
44
44
|
} from "../useLoadingOvertime";
|
|
45
|
-
import { useKeys } from "@hooks/useKeys";
|
|
46
45
|
|
|
47
46
|
export interface UseInfiniteListConfig {
|
|
48
47
|
pagination?: Pagination;
|
|
@@ -1,44 +1,43 @@
|
|
|
1
|
+
import { getXRay } from "@refinedev/devtools-internal";
|
|
1
2
|
import {
|
|
2
3
|
QueryObserverResult,
|
|
3
4
|
useQuery,
|
|
4
5
|
UseQueryOptions,
|
|
5
6
|
} from "@tanstack/react-query";
|
|
6
|
-
import { getXRay } from "@refinedev/devtools-internal";
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
CrudSorting,
|
|
15
|
-
MetaQuery,
|
|
16
|
-
SuccessErrorNotification,
|
|
17
|
-
LiveModeProps,
|
|
18
|
-
Prettify,
|
|
19
|
-
} from "../../interfaces";
|
|
9
|
+
handlePaginationParams,
|
|
10
|
+
pickDataProvider,
|
|
11
|
+
pickNotDeprecated,
|
|
12
|
+
useActiveAuthProvider,
|
|
13
|
+
} from "@definitions/helpers";
|
|
20
14
|
import {
|
|
21
|
-
|
|
15
|
+
useDataProvider,
|
|
22
16
|
useHandleNotification,
|
|
17
|
+
useMeta,
|
|
18
|
+
useOnError,
|
|
19
|
+
useResource,
|
|
23
20
|
useResourceSubscription,
|
|
24
21
|
useTranslate,
|
|
25
|
-
useDataProvider,
|
|
26
|
-
useOnError,
|
|
27
|
-
useMeta,
|
|
28
22
|
} from "@hooks";
|
|
23
|
+
import { useKeys } from "@hooks/useKeys";
|
|
29
24
|
import {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
25
|
+
BaseRecord,
|
|
26
|
+
CrudFilters,
|
|
27
|
+
CrudSorting,
|
|
28
|
+
GetListResponse,
|
|
29
|
+
HttpError,
|
|
30
|
+
LiveModeProps,
|
|
31
|
+
MetaQuery,
|
|
32
|
+
Pagination,
|
|
33
|
+
Prettify,
|
|
34
|
+
SuccessErrorNotification,
|
|
35
|
+
} from "../../interfaces";
|
|
36
36
|
import {
|
|
37
37
|
useLoadingOvertime,
|
|
38
38
|
UseLoadingOvertimeOptionsProps,
|
|
39
39
|
UseLoadingOvertimeReturnType,
|
|
40
40
|
} from "../useLoadingOvertime";
|
|
41
|
-
import { useKeys } from "@hooks/useKeys";
|
|
42
41
|
|
|
43
42
|
export interface UseListConfig {
|
|
44
43
|
pagination?: Pagination;
|
|
@@ -1,41 +1,40 @@
|
|
|
1
|
+
import { getXRay } from "@refinedev/devtools-internal";
|
|
1
2
|
import {
|
|
2
3
|
QueryObserverResult,
|
|
3
4
|
useQuery,
|
|
4
5
|
UseQueryOptions,
|
|
5
6
|
} from "@tanstack/react-query";
|
|
6
|
-
import { getXRay } from "@refinedev/devtools-internal";
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
|
-
|
|
9
|
+
handleMultiple,
|
|
10
|
+
pickDataProvider,
|
|
11
|
+
pickNotDeprecated,
|
|
12
|
+
useActiveAuthProvider,
|
|
13
|
+
} from "@definitions/helpers";
|
|
14
|
+
import {
|
|
15
|
+
useDataProvider,
|
|
16
|
+
useHandleNotification,
|
|
17
|
+
useMeta,
|
|
18
|
+
useOnError,
|
|
19
|
+
useResource,
|
|
20
|
+
useResourceSubscription,
|
|
21
|
+
useTranslate,
|
|
22
|
+
} from "@hooks";
|
|
23
|
+
import { useKeys } from "@hooks/useKeys";
|
|
24
|
+
import {
|
|
10
25
|
BaseKey,
|
|
26
|
+
BaseRecord,
|
|
11
27
|
GetManyResponse,
|
|
12
28
|
HttpError,
|
|
13
29
|
LiveModeProps,
|
|
14
|
-
SuccessErrorNotification,
|
|
15
30
|
MetaQuery,
|
|
31
|
+
SuccessErrorNotification,
|
|
16
32
|
} from "../../interfaces";
|
|
17
|
-
import {
|
|
18
|
-
useResource,
|
|
19
|
-
useTranslate,
|
|
20
|
-
useResourceSubscription,
|
|
21
|
-
useHandleNotification,
|
|
22
|
-
useDataProvider,
|
|
23
|
-
useOnError,
|
|
24
|
-
useMeta,
|
|
25
|
-
} from "@hooks";
|
|
26
|
-
import {
|
|
27
|
-
queryKeys,
|
|
28
|
-
pickDataProvider,
|
|
29
|
-
handleMultiple,
|
|
30
|
-
pickNotDeprecated,
|
|
31
|
-
useActiveAuthProvider,
|
|
32
|
-
} from "@definitions/helpers";
|
|
33
33
|
import {
|
|
34
34
|
useLoadingOvertime,
|
|
35
35
|
UseLoadingOvertimeOptionsProps,
|
|
36
36
|
UseLoadingOvertimeReturnType,
|
|
37
37
|
} from "../useLoadingOvertime";
|
|
38
|
-
import { useKeys } from "@hooks/useKeys";
|
|
39
38
|
|
|
40
39
|
export type UseManyProps<TQueryFnData, TError, TData> = {
|
|
41
40
|
/**
|
package/src/hooks/data/useOne.ts
CHANGED
|
@@ -1,41 +1,40 @@
|
|
|
1
|
+
import { getXRay } from "@refinedev/devtools-internal";
|
|
1
2
|
import {
|
|
2
3
|
QueryObserverResult,
|
|
3
4
|
useQuery,
|
|
4
5
|
UseQueryOptions,
|
|
5
6
|
} from "@tanstack/react-query";
|
|
6
|
-
import { getXRay } from "@refinedev/devtools-internal";
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
|
+
pickDataProvider,
|
|
10
|
+
pickNotDeprecated,
|
|
11
|
+
useActiveAuthProvider,
|
|
12
|
+
} from "@definitions";
|
|
13
|
+
import {
|
|
14
|
+
useDataProvider,
|
|
15
|
+
useHandleNotification,
|
|
16
|
+
useMeta,
|
|
17
|
+
useOnError,
|
|
18
|
+
useResource,
|
|
19
|
+
useResourceSubscription,
|
|
20
|
+
useTranslate,
|
|
21
|
+
} from "@hooks";
|
|
22
|
+
import { useKeys } from "@hooks/useKeys";
|
|
23
|
+
import {
|
|
24
|
+
BaseKey,
|
|
25
|
+
BaseRecord,
|
|
9
26
|
GetOneResponse,
|
|
10
27
|
HttpError,
|
|
11
|
-
BaseRecord,
|
|
12
|
-
BaseKey,
|
|
13
28
|
LiveModeProps,
|
|
14
|
-
SuccessErrorNotification,
|
|
15
29
|
MetaQuery,
|
|
16
30
|
Prettify,
|
|
31
|
+
SuccessErrorNotification,
|
|
17
32
|
} from "../../interfaces";
|
|
18
|
-
import {
|
|
19
|
-
useResource,
|
|
20
|
-
useTranslate,
|
|
21
|
-
useResourceSubscription,
|
|
22
|
-
useHandleNotification,
|
|
23
|
-
useDataProvider,
|
|
24
|
-
useOnError,
|
|
25
|
-
useMeta,
|
|
26
|
-
} from "@hooks";
|
|
27
|
-
import {
|
|
28
|
-
queryKeys,
|
|
29
|
-
pickDataProvider,
|
|
30
|
-
pickNotDeprecated,
|
|
31
|
-
useActiveAuthProvider,
|
|
32
|
-
} from "@definitions";
|
|
33
33
|
import {
|
|
34
34
|
useLoadingOvertime,
|
|
35
35
|
UseLoadingOvertimeOptionsProps,
|
|
36
36
|
UseLoadingOvertimeReturnType,
|
|
37
37
|
} from "../useLoadingOvertime";
|
|
38
|
-
import { useKeys } from "@hooks/useKeys";
|
|
39
38
|
|
|
40
39
|
export type UseOneProps<TQueryFnData, TError, TData> = {
|
|
41
40
|
/**
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
+
import { getXRay } from "@refinedev/devtools-internal";
|
|
1
2
|
import {
|
|
2
3
|
useMutation,
|
|
3
4
|
UseMutationOptions,
|
|
4
5
|
UseMutationResult,
|
|
5
6
|
useQueryClient,
|
|
6
7
|
} from "@tanstack/react-query";
|
|
7
|
-
import { getXRay } from "@refinedev/devtools-internal";
|
|
8
8
|
|
|
9
9
|
import { ActionTypes } from "@contexts/undoableQueue";
|
|
10
10
|
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
HttpError,
|
|
17
|
-
SuccessErrorNotification,
|
|
18
|
-
MetaQuery,
|
|
19
|
-
PreviousQuery,
|
|
20
|
-
GetListResponse,
|
|
21
|
-
IQueryKeys,
|
|
22
|
-
OptimisticUpdateMapType,
|
|
23
|
-
GetManyResponse,
|
|
24
|
-
GetOneResponse,
|
|
25
|
-
} from "../../interfaces";
|
|
11
|
+
pickDataProvider,
|
|
12
|
+
pickNotDeprecated,
|
|
13
|
+
queryKeysReplacement,
|
|
14
|
+
useActiveAuthProvider,
|
|
15
|
+
} from "@definitions/helpers";
|
|
26
16
|
import {
|
|
27
|
-
useResource,
|
|
28
|
-
useMutationMode,
|
|
29
17
|
useCancelNotification,
|
|
30
|
-
useTranslate,
|
|
31
|
-
usePublish,
|
|
32
|
-
useHandleNotification,
|
|
33
18
|
useDataProvider,
|
|
34
|
-
|
|
19
|
+
useHandleNotification,
|
|
35
20
|
useInvalidate,
|
|
36
|
-
|
|
21
|
+
useLog,
|
|
37
22
|
useMeta,
|
|
23
|
+
useMutationMode,
|
|
24
|
+
useOnError,
|
|
25
|
+
usePublish,
|
|
38
26
|
useRefineContext,
|
|
27
|
+
useResource,
|
|
28
|
+
useTranslate,
|
|
39
29
|
} from "@hooks";
|
|
30
|
+
import { useKeys } from "@hooks/useKeys";
|
|
40
31
|
import {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
32
|
+
BaseKey,
|
|
33
|
+
BaseRecord,
|
|
34
|
+
GetListResponse,
|
|
35
|
+
GetManyResponse,
|
|
36
|
+
GetOneResponse,
|
|
37
|
+
HttpError,
|
|
38
|
+
IQueryKeys,
|
|
39
|
+
MetaQuery,
|
|
40
|
+
MutationMode,
|
|
41
|
+
OptimisticUpdateMapType,
|
|
42
|
+
PrevContext as UpdateContext,
|
|
43
|
+
PreviousQuery,
|
|
44
|
+
SuccessErrorNotification,
|
|
45
|
+
UpdateResponse,
|
|
46
|
+
} from "../../interfaces";
|
|
46
47
|
import {
|
|
47
48
|
useLoadingOvertime,
|
|
48
49
|
UseLoadingOvertimeOptionsProps,
|
|
49
50
|
UseLoadingOvertimeReturnType,
|
|
50
51
|
} from "../useLoadingOvertime";
|
|
51
|
-
import { useKeys } from "@hooks/useKeys";
|
|
52
52
|
|
|
53
53
|
export type UpdateParams<TData, TError, TVariables> = {
|
|
54
54
|
/**
|