@refinedev/core 4.46.0 → 4.46.2
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 +109 -0
- package/dist/definitions/helpers/flatten-object-keys/index.d.ts.map +1 -1
- package/dist/esm/index.js +6 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/hooks/accessControl/useCan/index.d.ts.map +1 -1
- package/dist/hooks/auditLog/useLogList/index.d.ts.map +1 -1
- package/dist/hooks/auth/useOnError/index.d.ts.map +1 -1
- package/dist/hooks/data/useCreate.d.ts.map +1 -1
- package/dist/hooks/data/useCreateMany.d.ts.map +1 -1
- package/dist/hooks/data/useDelete.d.ts.map +1 -1
- package/dist/hooks/data/useDeleteMany.d.ts.map +1 -1
- package/dist/hooks/data/useInfiniteList.d.ts.map +1 -1
- package/dist/hooks/data/useList.d.ts.map +1 -1
- package/dist/hooks/data/useMany.d.ts.map +1 -1
- package/dist/hooks/data/useOne.d.ts.map +1 -1
- package/dist/hooks/data/useUpdate.d.ts.map +1 -1
- package/dist/hooks/data/useUpdateMany.d.ts.map +1 -1
- package/dist/hooks/router/use-go/index.d.ts +2 -0
- package/dist/hooks/router/use-go/index.d.ts.map +1 -1
- package/dist/hooks/useMeta/index.d.ts +2 -0
- package/dist/hooks/useMeta/index.d.ts.map +1 -1
- package/dist/iife/index.js +6 -6
- package/dist/iife/index.js.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/interfaces/auth.d.ts +6 -6
- package/dist/interfaces/auth.d.ts.map +1 -1
- package/dist/interfaces/metaData/graphqlQueryOptions.d.ts +6 -0
- package/dist/interfaces/metaData/graphqlQueryOptions.d.ts.map +1 -0
- package/dist/interfaces/metaData/metaQuery.d.ts +2 -1
- package/dist/interfaces/metaData/metaQuery.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/definitions/helpers/flatten-object-keys/index.ts +2 -0
- package/src/hooks/accessControl/useCan/index.ts +10 -12
- package/src/hooks/auditLog/useLogList/index.ts +10 -12
- package/src/hooks/auth/useForgotPassword/index.ts +51 -54
- package/src/hooks/auth/useGetIdentity/index.ts +23 -26
- package/src/hooks/auth/useIsAuthenticated/index.ts +20 -20
- package/src/hooks/auth/useLogin/index.ts +33 -35
- package/src/hooks/auth/useLogout/index.ts +32 -34
- package/src/hooks/auth/useOnError/index.ts +29 -33
- package/src/hooks/auth/usePermissions/index.ts +19 -22
- package/src/hooks/auth/useRegister/index.ts +60 -66
- package/src/hooks/auth/useUpdatePassword/index.ts +51 -54
- package/src/hooks/data/useCreate.ts +115 -117
- package/src/hooks/data/useCreateMany.ts +113 -118
- package/src/hooks/data/useDelete.ts +212 -223
- package/src/hooks/data/useDeleteMany.ts +230 -244
- package/src/hooks/data/useInfiniteList.ts +36 -42
- package/src/hooks/data/useList.ts +56 -62
- package/src/hooks/data/useMany.ts +36 -37
- package/src/hooks/data/useOne.ts +54 -55
- package/src/hooks/data/useUpdate.ts +288 -311
- package/src/hooks/data/useUpdateMany.ts +294 -320
- package/src/hooks/menu/useMenu.tsx +1 -1
- package/src/hooks/router/use-go/index.tsx +3 -0
- package/src/interfaces/auth.tsx +6 -6
- package/src/interfaces/metaData/graphqlQueryOptions.ts +6 -0
- package/src/interfaces/metaData/metaQuery.ts +3 -1
|
@@ -16,6 +16,7 @@ type ResourceWithoutId = {
|
|
|
16
16
|
resource: string;
|
|
17
17
|
action: Extract<Action, "create" | "list">;
|
|
18
18
|
id?: never;
|
|
19
|
+
meta?: Record<string, unknown>;
|
|
19
20
|
};
|
|
20
21
|
|
|
21
22
|
type ResourceWithId = {
|
|
@@ -25,6 +26,7 @@ type ResourceWithId = {
|
|
|
25
26
|
resource: string;
|
|
26
27
|
action: Extract<Action, "edit" | "show" | "clone">;
|
|
27
28
|
id: BaseKey;
|
|
29
|
+
meta?: Record<string, unknown>;
|
|
28
30
|
};
|
|
29
31
|
|
|
30
32
|
export type Resource = ResourceWithoutId | ResourceWithId;
|
|
@@ -60,6 +62,7 @@ export const useGo = () => {
|
|
|
60
62
|
action: config.to.action,
|
|
61
63
|
meta: {
|
|
62
64
|
id: config.to.id,
|
|
65
|
+
...config.to.meta,
|
|
63
66
|
},
|
|
64
67
|
});
|
|
65
68
|
|
package/src/interfaces/auth.tsx
CHANGED
|
@@ -50,12 +50,6 @@ export type AuthPageProps<
|
|
|
50
50
|
* @optional
|
|
51
51
|
*/
|
|
52
52
|
providers?: OAuthProvider[];
|
|
53
|
-
/**
|
|
54
|
-
* @description Render a redirect to login page button node. If set to false, login button will not be rendered.
|
|
55
|
-
* @default `"/login"`
|
|
56
|
-
* @optional
|
|
57
|
-
*/
|
|
58
|
-
loginLink?: React.ReactNode;
|
|
59
53
|
/**
|
|
60
54
|
* @description Render a redirect to register page button node. If set to false, register button will not be rendered.
|
|
61
55
|
* @default `"/register"`
|
|
@@ -90,6 +84,12 @@ export type AuthPageProps<
|
|
|
90
84
|
* @optional
|
|
91
85
|
*/
|
|
92
86
|
providers?: OAuthProvider[];
|
|
87
|
+
/**
|
|
88
|
+
* @description Render a redirect to login page button node. If set to false, login button will not be rendered.
|
|
89
|
+
* @default `"/login"`
|
|
90
|
+
* @optional
|
|
91
|
+
*/
|
|
92
|
+
loginLink?: React.ReactNode;
|
|
93
93
|
/**
|
|
94
94
|
* @description Can be used to hide the form components
|
|
95
95
|
* @optional
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { QueryFunctionContext } from "@tanstack/react-query";
|
|
2
2
|
import { QueryBuilderOptions } from "./queryBuilderOptions";
|
|
3
|
+
import { GraphQLQueryOptions } from "./graphqlQueryOptions";
|
|
3
4
|
|
|
4
5
|
export type MetaQuery = {
|
|
5
6
|
[k: string]: any;
|
|
6
7
|
queryContext?: Omit<QueryFunctionContext, "meta">;
|
|
7
|
-
} & QueryBuilderOptions
|
|
8
|
+
} & QueryBuilderOptions &
|
|
9
|
+
GraphQLQueryOptions;
|