@refinedev/core 4.46.1 → 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.
Files changed (51) hide show
  1. package/CHANGELOG.md +69 -0
  2. package/dist/definitions/helpers/flatten-object-keys/index.d.ts.map +1 -1
  3. package/dist/esm/index.js +6 -6
  4. package/dist/esm/index.js.map +1 -1
  5. package/dist/hooks/accessControl/useCan/index.d.ts.map +1 -1
  6. package/dist/hooks/auditLog/useLogList/index.d.ts.map +1 -1
  7. package/dist/hooks/auth/useOnError/index.d.ts.map +1 -1
  8. package/dist/hooks/data/useCreate.d.ts.map +1 -1
  9. package/dist/hooks/data/useCreateMany.d.ts.map +1 -1
  10. package/dist/hooks/data/useDelete.d.ts.map +1 -1
  11. package/dist/hooks/data/useDeleteMany.d.ts.map +1 -1
  12. package/dist/hooks/data/useInfiniteList.d.ts.map +1 -1
  13. package/dist/hooks/data/useList.d.ts.map +1 -1
  14. package/dist/hooks/data/useMany.d.ts.map +1 -1
  15. package/dist/hooks/data/useOne.d.ts.map +1 -1
  16. package/dist/hooks/data/useUpdate.d.ts.map +1 -1
  17. package/dist/hooks/data/useUpdateMany.d.ts.map +1 -1
  18. package/dist/hooks/router/use-go/index.d.ts +2 -0
  19. package/dist/hooks/router/use-go/index.d.ts.map +1 -1
  20. package/dist/iife/index.js +6 -6
  21. package/dist/iife/index.js.map +1 -1
  22. package/dist/index.js +6 -6
  23. package/dist/index.js.map +1 -1
  24. package/dist/interfaces/auth.d.ts +6 -6
  25. package/dist/interfaces/auth.d.ts.map +1 -1
  26. package/package.json +1 -1
  27. package/src/definitions/helpers/flatten-object-keys/index.ts +2 -0
  28. package/src/hooks/accessControl/useCan/index.ts +10 -12
  29. package/src/hooks/auditLog/useLogList/index.ts +10 -12
  30. package/src/hooks/auth/useForgotPassword/index.ts +51 -54
  31. package/src/hooks/auth/useGetIdentity/index.ts +23 -26
  32. package/src/hooks/auth/useIsAuthenticated/index.ts +20 -20
  33. package/src/hooks/auth/useLogin/index.ts +33 -35
  34. package/src/hooks/auth/useLogout/index.ts +32 -34
  35. package/src/hooks/auth/useOnError/index.ts +29 -33
  36. package/src/hooks/auth/usePermissions/index.ts +19 -22
  37. package/src/hooks/auth/useRegister/index.ts +60 -66
  38. package/src/hooks/auth/useUpdatePassword/index.ts +51 -54
  39. package/src/hooks/data/useCreate.ts +115 -117
  40. package/src/hooks/data/useCreateMany.ts +113 -118
  41. package/src/hooks/data/useDelete.ts +212 -227
  42. package/src/hooks/data/useDeleteMany.ts +230 -248
  43. package/src/hooks/data/useInfiniteList.ts +36 -42
  44. package/src/hooks/data/useList.ts +56 -62
  45. package/src/hooks/data/useMany.ts +36 -37
  46. package/src/hooks/data/useOne.ts +54 -55
  47. package/src/hooks/data/useUpdate.ts +288 -315
  48. package/src/hooks/data/useUpdateMany.ts +294 -325
  49. package/src/hooks/menu/useMenu.tsx +1 -1
  50. package/src/hooks/router/use-go/index.tsx +3 -0
  51. package/src/interfaces/auth.tsx +6 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,74 @@
1
1
  # @refinedev/core
2
2
 
3
+ ## 4.46.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#5423](https://github.com/refinedev/refine/pull/5423) [`75bb61dd3b`](https://github.com/refinedev/refine/commit/75bb61dd3b781e69f198f4e928ccffddb997fdc5) Thanks [@aliemir](https://github.com/aliemir)! - Updated `flattenObjectKeys` method to support both nested and non-nested variables when propagating server side errors to form fields. Resolves [#5461](https://github.com/refinedev/refine/issues/5461)
8
+
9
+ - [#5401](https://github.com/refinedev/refine/pull/5401) [`93e00fd770`](https://github.com/refinedev/refine/commit/93e00fd7701bce9e7201d04a6dd8f1419baeb68d) Thanks [@alicanerdurmaz](https://github.com/alicanerdurmaz)! - fix: `queryKey` is not overrideable. To fix this, `useQuery` overloads refactored with single argument objects.
10
+
11
+ ```diff
12
+ - useQuery(queryKey, queryFn, options);
13
+ + useQuery({ queryKey, queryFn, ...options });
14
+ ```
15
+
16
+ From now on, you can pass `queryKey` as an object property.
17
+
18
+ ```tsx
19
+ // all data hooks can be used with this syntax.
20
+ useList({
21
+ queryOptions: {
22
+ queryKey: ["my-query-key"],
23
+ },
24
+ });
25
+ ```
26
+
27
+ - [#5406](https://github.com/refinedev/refine/pull/5406) [`e5888b6b9c`](https://github.com/refinedev/refine/commit/e5888b6b9c9cc41546152f5b4d9adaf4405aa51c) Thanks [@aliemir](https://github.com/aliemir)! - `useMenu` hook was using outdated `meta` and router `params` due to missing dependency of the callback function. This was causing dynamic menu items to use wrong paths as links. (Resolves [#5432](https://github.com/refinedev/refine/issues/5432))
28
+
29
+ - [#5452](https://github.com/refinedev/refine/pull/5452) [`b621223bfb`](https://github.com/refinedev/refine/commit/b621223bfbc2bed569e41766f60b9687ddba9013) Thanks [@aliemir](https://github.com/aliemir)! - Added the ability to pass `meta` properties when using `useGo`'s `go` function with `to` as a resource object. This allows you to pass additional path parameters to the path defined in the resources array within the `<Refine />` component. Resolves [#5451](https://github.com/refinedev/refine/issues/5451)
30
+
31
+ Assume we have the following resource defined in the `<Refine />` component:
32
+
33
+ ```tsx
34
+ {
35
+ name: "posts",
36
+ list: "/posts",
37
+ edit: "/:foo/posts/:id/edit",
38
+ }
39
+ ```
40
+
41
+ ```tsx
42
+ import { useGo } from "@refinedev/core";
43
+
44
+ const MyButton = () => {
45
+ const go = useGo();
46
+
47
+ return (
48
+ <Button
49
+ onClick={() => {
50
+ go({
51
+ to: {
52
+ resource: "posts",
53
+ action: "edit",
54
+ id: "1",
55
+ meta: {
56
+ foo: "bar",
57
+ },
58
+ },
59
+ type: "push",
60
+ });
61
+ // generated path will be "/bar/posts/1/edit"
62
+ }}
63
+ >
64
+ Go Posts
65
+ </Button>
66
+ );
67
+ };
68
+ ```
69
+
70
+ - [#5381](https://github.com/refinedev/refine/pull/5381) [`19ceffbe9f`](https://github.com/refinedev/refine/commit/19ceffbe9f217fd354207b96610c25e8a7f3dcf3) Thanks [@aberhamm](https://github.com/aberhamm)! - fix: Missing `loginLink` attribute in `AuthPageProps` for `<AuthPage type="register" />`. #5381
71
+
3
72
  ## 4.46.1
4
73
 
5
74
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/definitions/helpers/flatten-object-keys/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,QAAS,GAAG,6CAgCzC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/definitions/helpers/flatten-object-keys/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,QAAS,GAAG,6CAkCzC,CAAC"}