@refinedev/core 4.16.3 → 4.17.0
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 +45 -0
- package/dist/components/containers/refine/index.d.ts +2 -2
- package/dist/components/pages/auth/index.d.ts +1 -1
- package/dist/components/pages/error/index.d.ts +1 -1
- package/dist/components/pages/login/index.d.ts +1 -1
- package/dist/components/pages/ready/index.d.ts +0 -1
- package/dist/components/pages/ready/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 +1 -1
- package/dist/hooks/auditLog/useLog/index.d.ts +1 -1
- package/dist/hooks/auditLog/useLogList/index.d.ts +1 -1
- package/dist/hooks/data/useCreate.d.ts +3 -3
- package/dist/hooks/data/useCreateMany.d.ts +1 -1
- package/dist/hooks/data/useCustom.d.ts +1 -1
- package/dist/hooks/data/useCustomMutation.d.ts +3 -3
- package/dist/hooks/data/useDelete.d.ts +3 -3
- package/dist/hooks/data/useDeleteMany.d.ts +1 -1
- package/dist/hooks/data/useInfiniteList.d.ts +1 -1
- package/dist/hooks/data/useList.d.ts +1 -1
- package/dist/hooks/data/useMany.d.ts +1 -1
- package/dist/hooks/data/useOne.d.ts +1 -1
- package/dist/hooks/data/useUpdate.d.ts +3 -3
- package/dist/hooks/data/useUpdateMany.d.ts +1 -1
- package/dist/hooks/export/index.d.ts +2 -2
- package/dist/hooks/form/useForm.d.ts +10 -2
- package/dist/hooks/form/useForm.d.ts.map +1 -1
- package/dist/hooks/import/index.d.ts +3 -3
- package/dist/hooks/menu/useMenu.d.ts +1 -1
- package/dist/hooks/navigation/index.d.ts +2 -2
- package/dist/hooks/refine/useSyncWithLocation.d.ts +1 -1
- package/dist/hooks/refine/useTitle.d.ts +1 -1
- package/dist/hooks/refine/useWarnAboutChange/index.d.ts +1 -1
- package/dist/hooks/show/useShow.d.ts +1 -1
- package/dist/hooks/translate/useGetLocale.d.ts +1 -1
- package/dist/hooks/translate/useSetLocale.d.ts +1 -1
- package/dist/hooks/translate/useTranslate.d.ts +1 -1
- package/dist/hooks/useSelect/index.d.ts +1 -1
- package/dist/iife/index.js +5 -5
- package/dist/iife/index.js.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/authenticated/index.tsx +1 -1
- package/src/components/containers/refine/index.tsx +2 -2
- package/src/components/pages/auth/index.tsx +1 -1
- package/src/components/pages/error/index.tsx +1 -1
- package/src/components/pages/login/index.tsx +1 -1
- package/src/components/pages/ready/index.tsx +0 -1
- package/src/definitions/helpers/legacy-resource-transform/index.ts +1 -1
- package/src/definitions/helpers/router/__tests__/compose-route.ts +6 -0
- package/src/hooks/accessControl/useCan/index.ts +1 -1
- package/src/hooks/auditLog/useLog/index.ts +1 -1
- package/src/hooks/auditLog/useLogList/index.ts +1 -1
- package/src/hooks/auth/useForgotPassword/index.ts +2 -2
- package/src/hooks/auth/useGetIdentity/index.ts +1 -1
- package/src/hooks/auth/useIsAuthenticated/index.ts +1 -1
- package/src/hooks/auth/useLogin/index.ts +2 -2
- package/src/hooks/auth/useLogout/index.ts +2 -2
- package/src/hooks/auth/useOnError/index.ts +1 -1
- package/src/hooks/auth/usePermissions/index.ts +1 -1
- package/src/hooks/auth/useRegister/index.ts +2 -2
- package/src/hooks/auth/useUpdatePassword/index.ts +2 -2
- package/src/hooks/breadcrumb/index.ts +1 -1
- package/src/hooks/data/useCreate.ts +3 -3
- package/src/hooks/data/useCreateMany.ts +1 -1
- package/src/hooks/data/useCustom.ts +1 -1
- package/src/hooks/data/useCustomMutation.ts +3 -3
- package/src/hooks/data/useDelete.ts +3 -3
- package/src/hooks/data/useDeleteMany.ts +1 -1
- package/src/hooks/data/useInfiniteList.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 +3 -3
- package/src/hooks/data/useUpdateMany.ts +1 -1
- package/src/hooks/export/index.ts +2 -2
- package/src/hooks/form/useForm.ts +20 -10
- package/src/hooks/import/index.tsx +3 -3
- package/src/hooks/menu/useMenu.tsx +1 -1
- package/src/hooks/navigation/index.ts +2 -2
- package/src/hooks/refine/useSyncWithLocation.ts +1 -1
- package/src/hooks/refine/useTitle.tsx +1 -1
- package/src/hooks/refine/useWarnAboutChange/index.ts +1 -1
- package/src/hooks/resource/useResource/index.ts +1 -1
- package/src/hooks/show/useShow.ts +1 -1
- package/src/hooks/translate/useGetLocale.ts +1 -1
- package/src/hooks/translate/useSetLocale.ts +1 -1
- package/src/hooks/translate/useTranslate.ts +1 -1
- package/src/hooks/useSelect/index.ts +1 -1
- package/src/hooks/useTable/index.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,50 @@
|
|
|
1
1
|
# @pankod/refine-core
|
|
2
2
|
|
|
3
|
+
## 4.17.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#4430](https://github.com/refinedev/refine/pull/4430) [`cf07d59587f`](https://github.com/refinedev/refine/commit/cf07d59587fae2adce97a79b40fdb60b9d9a9527) Thanks [@aliemir](https://github.com/aliemir)! - Added `queryMeta` and `mutationMeta` properties to the `useForm` hook. These properties are used to pass specific meta values to the query or mutation. This is useful when you have overlapping values in your data provider's `getOne` and `update` methods. For example, you may want to change the `method` of the mutation to `PATCH` but if you pass it in the `meta` property, you'll end up changing the method of the `getOne` request as well.
|
|
8
|
+
|
|
9
|
+
`queryMeta` and `mutationMeta` has precedence over `meta`. This means that if you have the same property in `queryMeta` and `meta`, the value in `queryMeta` will be used.
|
|
10
|
+
|
|
11
|
+
**Usage**
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import { useForm } from "@refinedev/core";
|
|
15
|
+
|
|
16
|
+
export const MyEditPage = () => {
|
|
17
|
+
const form = useForm({
|
|
18
|
+
// this is passed both to the mutation and the query requests
|
|
19
|
+
meta: {
|
|
20
|
+
myValue: "myValue",
|
|
21
|
+
},
|
|
22
|
+
// this is only passed to the query request
|
|
23
|
+
queryMeta: {
|
|
24
|
+
propertyOnlyWorksForQuery: "propertyOnlyWorksForQuery",
|
|
25
|
+
},
|
|
26
|
+
// this is only passed to the mutation request
|
|
27
|
+
mutationMeta: {
|
|
28
|
+
propertyOnlyWorksForMutation: "propertyOnlyWorksForMutation",
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- [#4430](https://github.com/refinedev/refine/pull/4430) [`cf07d59587f`](https://github.com/refinedev/refine/commit/cf07d59587fae2adce97a79b40fdb60b9d9a9527) Thanks [@aliemir](https://github.com/aliemir)! - Fix missing `meta` values in `useForm` redirects after submission.
|
|
37
|
+
|
|
38
|
+
- [#4431](https://github.com/refinedev/refine/pull/4431) [`c29a3618cf6`](https://github.com/refinedev/refine/commit/c29a3618cf6b577c36e90ec514f3a691c87aad8f) Thanks [@aliemir](https://github.com/aliemir)! - Updated the TSDoc comments to fix the broken links in the documentation.
|
|
39
|
+
|
|
40
|
+
- [#4426](https://github.com/refinedev/refine/pull/4426) [`0602f4cdf1c`](https://github.com/refinedev/refine/commit/0602f4cdf1c38f2b9dea8a293680a1872f4a448d) Thanks [@yildirayunlu](https://github.com/yildirayunlu)! - fix: `resource` parameter in the `legacyResourceTransform` helper is not optional but used as optional
|
|
41
|
+
|
|
42
|
+
## 4.16.4
|
|
43
|
+
|
|
44
|
+
### Patch Changes
|
|
45
|
+
|
|
46
|
+
- [#4415](https://github.com/refinedev/refine/pull/4415) [`54837825fcc`](https://github.com/refinedev/refine/commit/54837825fccb180e84c988ea669f0cc595e4ed33) Thanks [@alicanerdurmaz](https://github.com/alicanerdurmaz)! - fixed: `queryOptions` not working as expected in `useSelect` hook.
|
|
47
|
+
|
|
3
48
|
## 4.16.3
|
|
4
49
|
|
|
5
50
|
### Patch Changes
|
|
@@ -134,11 +134,11 @@ export interface RefineProps {
|
|
|
134
134
|
options?: IRefineOptions;
|
|
135
135
|
}
|
|
136
136
|
/**
|
|
137
|
-
* {@link https://refine.dev/docs/api-
|
|
137
|
+
* {@link https://refine.dev/docs/api-reference/core/components/refine-config `<Refine> component`} is the entry point of a refine app.
|
|
138
138
|
* It is where the highest level of configuration of the app occurs.
|
|
139
139
|
* Only a dataProvider is required to bootstrap the app. After adding a dataProvider, resources can be added as property.
|
|
140
140
|
*
|
|
141
|
-
* @see {@link https://refine.dev/docs/api-
|
|
141
|
+
* @see {@link https://refine.dev/docs/api-reference/core/components/refine-config} for more details.
|
|
142
142
|
*/
|
|
143
143
|
export declare const Refine: React.FC<RefineProps>;
|
|
144
144
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -6,7 +6,7 @@ export declare type AuthProps = AuthPageProps<DivPropsType, DivPropsType, FormPr
|
|
|
6
6
|
/**
|
|
7
7
|
* **refine** has a default auth page form which is served on `/login` route when the `authProvider` configuration is provided.
|
|
8
8
|
* @param title is not implemented yet.
|
|
9
|
-
* @see {@link https://refine.dev/docs/api-
|
|
9
|
+
* @see {@link https://refine.dev/docs/api-reference/core/components/auth-page/} for more details.
|
|
10
10
|
*/
|
|
11
11
|
export declare const AuthPage: React.FC<AuthProps>;
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -3,7 +3,7 @@ import React from "react";
|
|
|
3
3
|
* When the app is navigated to a non-existent route, refine shows a default error page.
|
|
4
4
|
* A custom error component can be used for this error page.
|
|
5
5
|
*
|
|
6
|
-
* @see {@link https://refine.dev/docs/
|
|
6
|
+
* @see {@link https://refine.dev/docs/packages/documentation/routers/} for more details.
|
|
7
7
|
*/
|
|
8
8
|
export declare const ErrorComponent: React.FC;
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -7,7 +7,7 @@ export interface ILoginForm {
|
|
|
7
7
|
* @deprecated LoginPage is deprecated. Use AuthPage instead. @see {@link https://refine.dev/docs/core/components/auth-page} for more details.
|
|
8
8
|
* **refine** has a default login page form which is served on `/login` route when the `authProvider` configuration is provided.
|
|
9
9
|
*
|
|
10
|
-
* @see {@link https://refine.dev/docs/api-
|
|
10
|
+
* @see {@link https://refine.dev/docs/api-reference/core/components/refine-config/#loginpage} for more details.
|
|
11
11
|
*/
|
|
12
12
|
export declare const LoginPage: React.FC;
|
|
13
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -2,7 +2,6 @@ import React from "react";
|
|
|
2
2
|
/**
|
|
3
3
|
* **refine** shows a default ready page on root route when no `resources` is passed to the `<Refine>` component as a property.
|
|
4
4
|
*
|
|
5
|
-
* @see {@link https://refine.dev/docs/api-references/components/refine-config#readypage} for more details.
|
|
6
5
|
* @deprecated `ReadyPage` is deprecated and will be removed in the next major release.
|
|
7
6
|
*/
|
|
8
7
|
export declare const ReadyPage: React.FC;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/pages/ready/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/pages/ready/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EA8B7B,CAAC"}
|