@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.
Files changed (67) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +16 -2
  3. package/dist/hooks/accessControl/useCan/index.d.cts +1 -1
  4. package/dist/hooks/accessControl/useCan/index.d.mts +1 -1
  5. package/dist/hooks/accessControl/useCan/index.d.mts.map +1 -1
  6. package/dist/hooks/accessControl/useCan/index.d.ts +1 -1
  7. package/dist/hooks/button/button-can-access/index.d.cts +1 -0
  8. package/dist/hooks/button/button-can-access/index.d.cts.map +1 -1
  9. package/dist/hooks/button/button-can-access/index.d.mts +1 -0
  10. package/dist/hooks/button/button-can-access/index.d.mts.map +1 -0
  11. package/dist/hooks/button/button-can-access/index.d.ts +1 -0
  12. package/dist/hooks/button/button-can-access/index.d.ts.map +1 -1
  13. package/dist/hooks/button/navigation-button/index.d.cts.map +1 -1
  14. package/dist/hooks/button/navigation-button/index.d.ts.map +1 -1
  15. package/dist/hooks/data/useCustom.d.cts +1 -1
  16. package/dist/hooks/data/useCustom.d.mts +1 -1
  17. package/dist/hooks/data/useCustom.d.mts.map +1 -1
  18. package/dist/hooks/data/useCustom.d.ts +1 -1
  19. package/dist/hooks/data/useDelete.d.cts +1 -1
  20. package/dist/hooks/data/useDelete.d.mts +1 -1
  21. package/dist/hooks/data/useDelete.d.mts.map +1 -1
  22. package/dist/hooks/data/useDelete.d.ts +1 -1
  23. package/dist/hooks/data/useDeleteMany.d.cts +1 -1
  24. package/dist/hooks/data/useDeleteMany.d.mts +1 -1
  25. package/dist/hooks/data/useDeleteMany.d.mts.map +1 -1
  26. package/dist/hooks/data/useDeleteMany.d.ts +1 -1
  27. package/dist/hooks/data/useList.d.cts +1 -1
  28. package/dist/hooks/data/useList.d.mts +1 -1
  29. package/dist/hooks/data/useList.d.mts.map +1 -1
  30. package/dist/hooks/data/useList.d.ts +1 -1
  31. package/dist/hooks/data/useMany.d.cts +1 -1
  32. package/dist/hooks/data/useMany.d.mts +1 -1
  33. package/dist/hooks/data/useMany.d.mts.map +1 -1
  34. package/dist/hooks/data/useMany.d.ts +1 -1
  35. package/dist/hooks/data/useOne.d.cts +1 -1
  36. package/dist/hooks/data/useOne.d.mts +1 -1
  37. package/dist/hooks/data/useOne.d.mts.map +1 -1
  38. package/dist/hooks/data/useOne.d.ts +1 -1
  39. package/dist/hooks/data/useUpdate.d.cts +1 -1
  40. package/dist/hooks/data/useUpdate.d.mts +1 -1
  41. package/dist/hooks/data/useUpdate.d.mts.map +1 -1
  42. package/dist/hooks/data/useUpdate.d.ts +1 -1
  43. package/dist/hooks/data/useUpdateMany.d.cts +1 -1
  44. package/dist/hooks/data/useUpdateMany.d.mts +1 -1
  45. package/dist/hooks/data/useUpdateMany.d.mts.map +1 -1
  46. package/dist/hooks/data/useUpdateMany.d.ts +1 -1
  47. package/dist/hooks/form/types.d.cts +1 -1
  48. package/dist/hooks/form/types.d.mts +1 -1
  49. package/dist/hooks/form/types.d.mts.map +1 -1
  50. package/dist/hooks/form/types.d.ts +1 -1
  51. package/dist/index.cjs +16 -16
  52. package/dist/index.cjs.map +1 -1
  53. package/dist/index.mjs +17 -17
  54. package/dist/index.mjs.map +1 -1
  55. package/package.json +1 -1
  56. package/src/hooks/accessControl/useCan/index.ts +1 -1
  57. package/src/hooks/button/button-can-access/index.tsx +2 -1
  58. package/src/hooks/button/navigation-button/index.tsx +1 -0
  59. package/src/hooks/data/useCustom.ts +1 -1
  60. package/src/hooks/data/useDelete.ts +1 -1
  61. package/src/hooks/data/useDeleteMany.ts +1 -1
  62. package/src/hooks/data/useList.ts +1 -1
  63. package/src/hooks/data/useMany.ts +1 -1
  64. package/src/hooks/data/useOne.ts +1 -1
  65. package/src/hooks/data/useUpdate.ts +1 -1
  66. package/src/hooks/data/useUpdateMany.ts +1 -1
  67. 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.7",
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://react-query.tanstack.com/guides/queries `useQuery`}. It takes the parameters that `can` takes. It can also be configured with `queryOptions` for `useQuery`. Returns the result of `useQuery`.
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
  },
@@ -61,6 +61,7 @@ export function useNavigationButton(
61
61
  const { canAccess, title, hidden, disabled } = useButtonCanAccess({
62
62
  action: props.action,
63
63
  accessControl: props.accessControl,
64
+ meta: props.meta,
64
65
  id,
65
66
  resource,
66
67
  });
@@ -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://react-query.tanstack.com/guides/queries `useQuery`} used for custom requests.
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.md)
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.md)
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://react-query.tanstack.com/guides/queries `useQuery`} used for retrieving items from a `resource` with pagination, sort, and filter configurations.
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://react-query.tanstack.com/guides/queries `useQuery`} used for retrieving multiple items from a `resource`.
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
  *
@@ -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://react-query.tanstack.com/guides/queries `useQuery`} used for retrieving single items from a `resource`.
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.md)
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.md)
90
+ * [Determines when mutations are executed](/docs/advanced-tutorials/mutation-mode/)
91
91
  */
92
92
  mutationMode?: MutationMode;
93
93
  /**
@@ -118,7 +118,7 @@ type ActionFormProps<
118
118
  */
119
119
  mutationMeta?: MetaQuery;
120
120
  /**
121
- * [Determines when mutations are executed](/advanced-tutorials/mutation-mode.md)
121
+ * [Determines when mutations are executed](/docs/advanced-tutorials/mutation-mode/)
122
122
  * @default `"pessimistic"*`
123
123
  */
124
124
  mutationMode?: MutationMode;