Skip to content

Commit

Permalink
release: august 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
aliemir authored Aug 5, 2024
2 parents bc03bff + a237b51 commit 4b1e538
Show file tree
Hide file tree
Showing 801 changed files with 14,824 additions and 3,754 deletions.
18 changes: 18 additions & 0 deletions .changeset/afraid-baboons-roll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
"@refinedev/mui": minor
---

feat: [`useAutocomplete`](https://refine.dev/docs/ui-integrations/material-ui/hooks/use-auto-complete/)'s `queryResult` and `defaultValueQueryResult` is deprecated, use `query` and `defaultValueQuery` instead. #6179

```diff
import { useAutocomplete } from '@refinedev/mui';

- const { queryResult, defaultValueQueryResult } = useAutocomplete();
+ const { query, defaultValueQuery } = useAutocomplete();
```

> ✨ You can use `@refinedev/codemod` to automatically migrate your codebase. Simply run the following command in your project's root directory:
>
> ```bash
> npx @refinedev/codemod@latest rename-query-and-mutation-result
> ```
5 changes: 5 additions & 0 deletions .changeset/bright-dryers-march.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@refinedev/core": patch
---

Bump `@refinedev/devtools-internal` dependency to reflect the latest changes in the Refine Devtools.
9 changes: 9 additions & 0 deletions .changeset/chilled-cherries-sin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@refinedev/core": patch
---

fix(core): fixed type issue in useSelect. #6223

Previously, the types would not allow functions to be passed as props. After this change, it will be possible.

[Resolves #6223](https://github.com/refinedev/refine/issues/6223)
11 changes: 11 additions & 0 deletions .changeset/cold-olives-allow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@refinedev/mui": patch
---

fix(mui): <DataGrid /> horizontal scroll is broken in <ThemedLayoutV2 />

Due to the changes in CSS rendering in latest Google Chrome updates, `<DataGrid />` components are not properly sized when used inside `<ThemedLayoutV2 />` component. The `overflow: clip` property in the layout content is causing either miscalculations on the data grid width or causing an overflow on the container and overlapping with the sidebar.

This change replaces the `overflow: clip` property with `min-height` and `min-width` properties to ensure the layout content is properly rendered and responsive to the content inside it.

[Resolves #6077](https://github.com/refinedev/refine/issues/6077)
18 changes: 18 additions & 0 deletions .changeset/cool-cougars-shop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
"@refinedev/core": minor
---

feat: [`useSelect`](https://refine.dev/docs/data/hooks/use-select/)'s `queryResult` and `defaultValueQueryResult` is deprecated, use `query` and `defaultValueQuery` instead. #6179

```diff
import { useSelect } from '@refinedev/core';

- const { queryResult, defaultValueQueryResult } = useSelect();
+ const { query, defaultValueQuery } = useSelect();
```

> ✨ You can use `@refinedev/codemod` to automatically migrate your codebase. Simply run the following command in your project's root directory:
>
> ```bash
> npx @refinedev/codemod@latest rename-query-and-mutation-result
> ```
11 changes: 11 additions & 0 deletions .changeset/cyan-fireants-melt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@refinedev/cli": minor
---

feat(cli): improve the resource add command to generate page files for Next.js

When using the add resource command in a project using Next.js, a page will be generated to perform the selected actions for that resource.

These pages simply display generated components that perform actions on the resource. The placement of page files assumes operation with the App Router. If you prefer to use the Page Router instead, you'll need to move them manually.

[Resolves #6091](https://github.com/refinedev/refine/issues/6091)
7 changes: 7 additions & 0 deletions .changeset/eleven-bottles-rush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@refinedev/cli": minor
---

feat: Automatically install `@refinedev/inferencer` if missing after generating new resources.

[Resolves #6220](https://github.com/refinedev/refine/issues/6220)
5 changes: 5 additions & 0 deletions .changeset/famous-donuts-bake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@refinedev/core": patch
---

AuthPage in Next.js generates code with i18n but the folder hooks is not created. imported useTranslate from @hooks to fix the issue
62 changes: 62 additions & 0 deletions .changeset/fast-badgers-drum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
"@refinedev/core": minor
---

feat: [Mutation parameters](https://refine.dev/docs/data/hooks/use-update/#mutation-parameters) should be given as a prop to the `useUpdate` hook. #6102
From now on, you can pass mutation parameters to the `useUpdate` hook as a prop.

Old usage of `useUpdate` hook:

```tsx
import { useUpdate } from "@refinedev/core";

const { mutate } = useUpdate();

mutate(
{
resource: "products",
id: 1,
mutationMode: "optimistic",
successNotification: false,
values: {
name: "New Product",
material: "Wood",
},
},
{
onSuccess: () => {
/* do something after mutation success */
},
},
);
```

New usage of `useUpdate` hook:

```tsx
import { useUpdate } from "@refinedev/core";

const { mutate } = useUpdate({
resource: "products",
successNotification: false,
mutationMode: "optimistic",
mutationOptions: {
onSuccess: () => {
/* do something after mutation success */
},
},
});

mutate({
// also you can override the parameters given to the hook
id: 1,
values: {
name: "New Product",
material: "Wood",
},
});
```

You can think of the parameters given to the `useUpdate` hook as default values, while the parameters given to the `mutate` function are the values used for that specific mutation or dynamic values.

> 🚨 If you pass these parameters to the `mutate` function, it will override the values given to the hook.
9 changes: 9 additions & 0 deletions .changeset/fast-hounds-guess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@refinedev/mui": patch
---

fix(use-data-grid): incompatible types when using data-grid-pro

useDataGrid overide DataGridPropsType onFilterModelChange.

[Fixes #5997](https://github.com/refinedev/refine/issues/5997)
44 changes: 44 additions & 0 deletions .changeset/five-pianos-march.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
"@refinedev/react-router-v6": minor
---

feat: [`<DocumentTitleHandler/>`](https://refine.dev/docs/routing/integrations/react-router/#documenttitlehandler) should populated `resource.meta.label` field if it's not provided on the Refine's resource definition.
From now on, users be able to use the `resource.meta.label` field to customize document title more easily.

```tsx
import {
BrowserRouter,
DocumentTitleHandler,
} from "@refinedev/react-router-v6";
import { Refine } from "@refinedev/core";

const App = () => {
return (
<BrowserRouter>
<Refine
/* ... */
>
{/* ... */}
<DocumentTitleHandler
handler={({ action, params, resource }) => {
const id = params?.id ?? "";

const actionPrefixMatcher = {
create: "Create new ",
clone: `#${id} Clone ${resource?.meta?.label}`,
edit: `#${id} Edit ${resource?.meta?.label}`,
show: `#${id} Show ${resource?.meta?.label}`,
list: `${resource?.meta?.label}`,
};

const suffix = " | <Company Name>";
const title = actionPrefixMatcher[action || "list"] + suffix;

return title;
}}
/>
</Refine>
</BrowserRouter>
);
};
```
5 changes: 5 additions & 0 deletions .changeset/flat-boats-knock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@refinedev/cli": patch
---

fix: `yarn refine update` removes semver range specifiers(`^`, `~`) from `package.json`. #6134
44 changes: 44 additions & 0 deletions .changeset/four-carpets-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
"@refinedev/nextjs-router": minor
---

feat: [`<DocumentTitleHandler/>`](https://refine.dev/docs/routing/integrations/next-js/#documenttitlehandler) should populated `resource.meta.label` field if it's not provided on the Refine's resource definition.
From now on, users be able to use the `resource.meta.label` field to customize document title more easily.

```tsx
import {
BrowserRouter,
DocumentTitleHandler,
} from "@refinedev/react-router-v6";
import { Refine } from "@refinedev/core";

const App = () => {
return (
<BrowserRouter>
<Refine
/* ... */
>
{/* ... */}
<DocumentTitleHandler
handler={({ action, params, resource }) => {
const id = params?.id ?? "";

const actionPrefixMatcher = {
create: "Create new ",
clone: `#${id} Clone ${resource?.meta?.label}`,
edit: `#${id} Edit ${resource?.meta?.label}`,
show: `#${id} Show ${resource?.meta?.label}`,
list: `${resource?.meta?.label}`,
};

const suffix = " | <Company Name>";
const title = actionPrefixMatcher[action || "list"] + suffix;

return title;
}}
/>
</Refine>
</BrowserRouter>
);
};
```
36 changes: 36 additions & 0 deletions .changeset/gentle-vans-tease.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
"@refinedev/antd": minor
---

feat: [`useSelect`](https://refine.dev/docs/ui-integrations/ant-design/hooks/use-select/)'s `queryResult` and `defaultValueQueryResult` is deprecated, use `query` and `defaultValueQuery` instead. #6179

```diff
import { useSelect } from '@refinedev/antd';

- const { queryResult, defaultValueQueryResult } = useSelect();
+ const { query, defaultValueQuery } = useSelect();
```

feat: [`useCheckboxGroup`](https://refine.dev/docs/ui-integrations/ant-design/hooks/use-checkbox-group/)'s `queryResult` is deprecated, use `query` instead.

```diff
import { useCheckboxGroup } from '@refinedev/antd';

- const { queryResult } = useCheckboxGroup();
+ const { query } = useCheckboxGroup();
```

feat: [`useRadioGroup`](https://refine.dev/docs/ui-integrations/ant-design/hooks/use-radio-group/)'s `queryResult` is deprecated, use `query` instead.

```diff
import { useRadioGroup } from '@refinedev/antd';

- const { queryResult } = useRadioGroup();
+ const { query } = useRadioGroup();
```

> ✨ You can use `@refinedev/codemod` to automatically migrate your codebase. Simply run the following command in your project's root directory:
>
> ```bash
> npx @refinedev/codemod@latest rename-query-and-mutation-result
> ```
60 changes: 60 additions & 0 deletions .changeset/gorgeous-stingrays-unite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
"@refinedev/core": minor
---

feat: [Mutation parameters](https://refine.dev/docs/data/hooks/use-create/#mutation-parameters) should be given as a prop to the `useCreate` hook. #6113
From now on, you can pass mutation parameters to the `useCreate` hook as a prop.

Old usage of `useCreate` hook:

```tsx
import { useCreate } from "@refinedev/core";

const { mutate } = useCreate();

mutate(
{
resource: "products",
values: {
name: "New Product",
material: "Wood",
},
mutationMode: "optimistic",
successNotification: false,
},
{
onSuccess: () => {
/* do something after mutation success */
},
},
);
```

New usage of `useCreate` hook:

```tsx
import { useCreate } from "@refinedev/core";

const { mutate } = useCreate({
resource: "products",
successNotification: false,
mutationMode: "optimistic",
mutationOptions: {
onSuccess: () => {
/* do something after mutation success */
},
},
});

mutate({
// also you can override the parameters given to the hook
values: {
name: "New Product",
material: "Wood",
},
});
```

You can think of the parameters given to the `useCreate` hook as default values, while the parameters given to the `mutate` function are the values used for that specific mutation or dynamic values.

> 🚨 If you pass these parameters to the `mutate` function, it will override the values given to the hook.
5 changes: 5 additions & 0 deletions .changeset/great-hotels-teach.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@refinedev/inferencer": patch
---

feat: inferencer now uses `query` a instead of the deprecated `queryResult` when generating code for `useShow`. #6173
7 changes: 7 additions & 0 deletions .changeset/hot-cougars-dream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@refinedev/supabase": patch
---

feat: added support for between filter in supabase dataProvider. Maps values to gte & lte.

[Feat #6119](https://github.com/refinedev/refine/issues/6119)
18 changes: 18 additions & 0 deletions .changeset/itchy-dancers-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
"@refinedev/core": minor
---

feat: [`useTable`](https://refine.dev/docs/data/hooks/use-table/)'s `tableQueryResult` is deprecated, use `tableQuery` instead. #6169

```diff
import { useTable } from '@refinedev/core';

- const { tableQueryResult } = useTable();
+ const { tableQuery } = useTable();
```

> ✨ You can use `@refinedev/codemod` to automatically migrate your codebase. Simply run the following command in your project's root directory:
>
> ```bash
> npx @refinedev/codemod@latest rename-query-and-mutation-result
> ```
Loading

0 comments on commit 4b1e538

Please sign in to comment.