@refinedev/core 4.57.7 → 4.57.10
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 +26 -0
- package/README.md +16 -2
- package/dist/hooks/accessControl/useCan/index.d.cts +1 -1
- package/dist/hooks/accessControl/useCan/index.d.mts +1 -1
- package/dist/hooks/accessControl/useCan/index.d.mts.map +1 -1
- package/dist/hooks/accessControl/useCan/index.d.ts +1 -1
- package/dist/hooks/button/button-can-access/index.d.cts +1 -0
- package/dist/hooks/button/button-can-access/index.d.cts.map +1 -1
- package/dist/hooks/button/button-can-access/index.d.mts +1 -0
- package/dist/hooks/button/button-can-access/index.d.mts.map +1 -0
- package/dist/hooks/button/button-can-access/index.d.ts +1 -0
- package/dist/hooks/button/button-can-access/index.d.ts.map +1 -1
- package/dist/hooks/button/navigation-button/index.d.cts.map +1 -1
- package/dist/hooks/button/navigation-button/index.d.ts.map +1 -1
- package/dist/hooks/data/useCustom.d.cts +1 -1
- package/dist/hooks/data/useCustom.d.mts +1 -1
- package/dist/hooks/data/useCustom.d.mts.map +1 -1
- package/dist/hooks/data/useCustom.d.ts +1 -1
- package/dist/hooks/data/useDelete.d.cts +1 -1
- package/dist/hooks/data/useDelete.d.mts +1 -1
- package/dist/hooks/data/useDelete.d.mts.map +1 -1
- package/dist/hooks/data/useDelete.d.ts +1 -1
- package/dist/hooks/data/useDeleteMany.d.cts +1 -1
- package/dist/hooks/data/useDeleteMany.d.mts +1 -1
- package/dist/hooks/data/useDeleteMany.d.mts.map +1 -1
- package/dist/hooks/data/useDeleteMany.d.ts +1 -1
- package/dist/hooks/data/useList.d.cts +1 -1
- package/dist/hooks/data/useList.d.mts +1 -1
- package/dist/hooks/data/useList.d.mts.map +1 -1
- package/dist/hooks/data/useList.d.ts +1 -1
- package/dist/hooks/data/useMany.d.cts +1 -1
- package/dist/hooks/data/useMany.d.mts +1 -1
- package/dist/hooks/data/useMany.d.mts.map +1 -1
- package/dist/hooks/data/useMany.d.ts +1 -1
- package/dist/hooks/data/useOne.d.cts +1 -1
- package/dist/hooks/data/useOne.d.mts +1 -1
- package/dist/hooks/data/useOne.d.mts.map +1 -1
- package/dist/hooks/data/useOne.d.ts +1 -1
- package/dist/hooks/data/useUpdate.d.cts +1 -1
- package/dist/hooks/data/useUpdate.d.mts +1 -1
- package/dist/hooks/data/useUpdate.d.mts.map +1 -1
- package/dist/hooks/data/useUpdate.d.ts +1 -1
- package/dist/hooks/data/useUpdateMany.d.cts +1 -1
- package/dist/hooks/data/useUpdateMany.d.mts +1 -1
- package/dist/hooks/data/useUpdateMany.d.mts.map +1 -1
- package/dist/hooks/data/useUpdateMany.d.ts +1 -1
- package/dist/hooks/form/types.d.cts +1 -1
- package/dist/hooks/form/types.d.mts +1 -1
- package/dist/hooks/form/types.d.mts.map +1 -1
- package/dist/hooks/form/types.d.ts +1 -1
- package/dist/index.cjs +16 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +17 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/hooks/accessControl/useCan/index.ts +1 -1
- package/src/hooks/button/button-can-access/index.tsx +2 -1
- package/src/hooks/button/navigation-button/index.tsx +1 -0
- package/src/hooks/data/useCustom.ts +1 -1
- package/src/hooks/data/useDelete.ts +1 -1
- package/src/hooks/data/useDeleteMany.ts +1 -1
- package/src/hooks/data/useList.ts +1 -1
- package/src/hooks/data/useMany.ts +1 -1
- package/src/hooks/data/useOne.ts +1 -1
- package/src/hooks/data/useUpdate.ts +1 -1
- package/src/hooks/data/useUpdateMany.ts +1 -1
- package/src/hooks/form/types.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@refinedev/core",
|
|
3
|
-
"version": "4.57.
|
|
3
|
+
"version": "4.57.10",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Refine is a React meta-framework for building enterprise-level, data-intensive applications rapidly with support for modern UI libraries and headless integrations.",
|
|
6
6
|
"repository": {
|
|
@@ -23,7 +23,7 @@ export type UseCanProps = CanParams & {
|
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
|
-
* `useCan` uses the `can` as the query function for `react-query`'s {@link https://
|
|
26
|
+
* `useCan` uses the `can` as the query function for `react-query`'s {@link https://tanstack.com/query/v4/docs/framework/react/guides/queries `useQuery`}. It takes the parameters that `can` takes. It can also be configured with `queryOptions` for `useQuery`. Returns the result of `useQuery`.
|
|
27
27
|
* @see {@link https://refine.dev/docs/api-reference/core/hooks/accessControl/useCan} for more details.
|
|
28
28
|
*
|
|
29
29
|
* @typeParam CanParams {@link https://refine.dev/docs/core/interfaceReferences#canparams}
|
|
@@ -17,6 +17,7 @@ type ButtonCanAccessProps = {
|
|
|
17
17
|
enabled?: boolean;
|
|
18
18
|
hideIfUnauthorized?: boolean;
|
|
19
19
|
};
|
|
20
|
+
meta?: Record<string, unknown>;
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
type ButtonCanAccessValues = {
|
|
@@ -43,7 +44,7 @@ export const useButtonCanAccess = (
|
|
|
43
44
|
const { data: canAccess } = useCan({
|
|
44
45
|
resource: props.resource?.name,
|
|
45
46
|
action: props.action === "clone" ? "create" : props.action,
|
|
46
|
-
params: { id: props.id, resource: props.resource },
|
|
47
|
+
params: { meta: props.meta, id: props.id, resource: props.resource },
|
|
47
48
|
queryOptions: {
|
|
48
49
|
enabled: accessControlEnabled,
|
|
49
50
|
},
|
|
@@ -89,7 +89,7 @@ export type UseCustomProps<TQueryFnData, TError, TQuery, TPayload, TData> = {
|
|
|
89
89
|
UseLoadingOvertimeOptionsProps;
|
|
90
90
|
|
|
91
91
|
/**
|
|
92
|
-
* `useCustom` is a modified version of `react-query`'s {@link https://
|
|
92
|
+
* `useCustom` is a modified version of `react-query`'s {@link https://tanstack.com/query/v4/docs/framework/react/guides/queries `useQuery`} used for custom requests.
|
|
93
93
|
*
|
|
94
94
|
* It uses the `custom` method from the `dataProvider` which is passed to `<Refine>`.
|
|
95
95
|
*
|
|
@@ -58,7 +58,7 @@ export type DeleteParams<TData, TError, TVariables> = {
|
|
|
58
58
|
*/
|
|
59
59
|
resource: string;
|
|
60
60
|
/**
|
|
61
|
-
* [Determines when mutations are executed](/advanced-tutorials/mutation-mode
|
|
61
|
+
* [Determines when mutations are executed](/docs/advanced-tutorials/mutation-mode/)
|
|
62
62
|
*/
|
|
63
63
|
mutationMode?: MutationMode;
|
|
64
64
|
/**
|
|
@@ -59,7 +59,7 @@ export type DeleteManyParams<TData, TError, TVariables> = {
|
|
|
59
59
|
*/
|
|
60
60
|
resource: string;
|
|
61
61
|
/**
|
|
62
|
-
* [Determines when mutations are executed](/advanced-tutorials/mutation-mode
|
|
62
|
+
* [Determines when mutations are executed](/docs/advanced-tutorials/mutation-mode/)
|
|
63
63
|
*/
|
|
64
64
|
mutationMode?: MutationMode;
|
|
65
65
|
/**
|
|
@@ -111,7 +111,7 @@ export type UseListProps<TQueryFnData, TError, TData> = {
|
|
|
111
111
|
UseLoadingOvertimeOptionsProps;
|
|
112
112
|
|
|
113
113
|
/**
|
|
114
|
-
* `useList` is a modified version of `react-query`'s {@link https://
|
|
114
|
+
* `useList` is a modified version of `react-query`'s {@link https://tanstack.com/query/v4/docs/framework/react/guides/queries `useQuery`} used for retrieving items from a `resource` with pagination, sort, and filter configurations.
|
|
115
115
|
*
|
|
116
116
|
* It uses the `getList` method as the query function from the `dataProvider` which is passed to `<Refine>`.
|
|
117
117
|
*
|
|
@@ -76,7 +76,7 @@ export type UseManyProps<TQueryFnData, TError, TData> = {
|
|
|
76
76
|
UseLoadingOvertimeOptionsProps;
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
|
-
* `useMany` is a modified version of `react-query`'s {@link https://
|
|
79
|
+
* `useMany` is a modified version of `react-query`'s {@link https://tanstack.com/query/v4/docs/framework/react/guides/queries `useQuery`} used for retrieving multiple items from a `resource`.
|
|
80
80
|
*
|
|
81
81
|
* It uses `getMany` method as query function from the `dataProvider` which is passed to `<Refine>`.
|
|
82
82
|
*
|
package/src/hooks/data/useOne.ts
CHANGED
|
@@ -79,7 +79,7 @@ export type UseOneProps<TQueryFnData, TError, TData> = {
|
|
|
79
79
|
UseLoadingOvertimeOptionsProps;
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
|
-
* `useOne` is a modified version of `react-query`'s {@link https://
|
|
82
|
+
* `useOne` is a modified version of `react-query`'s {@link https://tanstack.com/query/v4/docs/framework/react/guides/queries `useQuery`} used for retrieving single items from a `resource`.
|
|
83
83
|
*
|
|
84
84
|
* It uses `getOne` method as query function from the `dataProvider` which is passed to `<Refine>`.
|
|
85
85
|
*
|
|
@@ -85,7 +85,7 @@ export type UpdateParams<TData, TError, TVariables> = {
|
|
|
85
85
|
*/
|
|
86
86
|
id?: BaseKey;
|
|
87
87
|
/**
|
|
88
|
-
* [Determines when mutations are executed](/advanced-tutorials/mutation-mode
|
|
88
|
+
* [Determines when mutations are executed](/docs/advanced-tutorials/mutation-mode/)
|
|
89
89
|
*/
|
|
90
90
|
mutationMode?: MutationMode;
|
|
91
91
|
/**
|
|
@@ -87,7 +87,7 @@ export type UpdateManyParams<TData, TError, TVariables> = {
|
|
|
87
87
|
*/
|
|
88
88
|
resource?: string;
|
|
89
89
|
/**
|
|
90
|
-
* [Determines when mutations are executed](/advanced-tutorials/mutation-mode
|
|
90
|
+
* [Determines when mutations are executed](/docs/advanced-tutorials/mutation-mode/)
|
|
91
91
|
*/
|
|
92
92
|
mutationMode?: MutationMode;
|
|
93
93
|
/**
|
package/src/hooks/form/types.ts
CHANGED
|
@@ -118,7 +118,7 @@ type ActionFormProps<
|
|
|
118
118
|
*/
|
|
119
119
|
mutationMeta?: MetaQuery;
|
|
120
120
|
/**
|
|
121
|
-
* [Determines when mutations are executed](/advanced-tutorials/mutation-mode
|
|
121
|
+
* [Determines when mutations are executed](/docs/advanced-tutorials/mutation-mode/)
|
|
122
122
|
* @default `"pessimistic"*`
|
|
123
123
|
*/
|
|
124
124
|
mutationMode?: MutationMode;
|