Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: november 2024 #6445

Merged
merged 11 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/beige-cougars-add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@refinedev/chakra-ui": patch
---

chore(tsdoc): fix broken external documentation link

In TSDoc description of the `<EmailField />` component, link to the official documentation of Chakra UI was broken and couldn't be opened. This PR fixes the link by updating the URL to the correct one.
45 changes: 45 additions & 0 deletions .changeset/breezy-wolves-nail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
"@refinedev/chakra-ui": minor
"@refinedev/mantine": minor
"@refinedev/antd": minor
"@refinedev/core": minor
"@refinedev/mui": minor
---

feat: added new prop called `mutationVariables` to `<AuthPage />`. #6431
From now on, you can pass additional parameters to the `authProvider` methods using the `mutationVariables` prop of the `<AuthPage />` component.

```tsx
import { AuthPage } from "@refinedev/antd"; // or "@refinedev/chakra-ui", "@refinedev/mantine", "@refinedev/mui"

const MyLoginPage = () => {
return (
<AuthPage
type="login" // all other types are also supported.
// highlight-start
mutationVariables={{
foo: "bar",
xyz: "abc",
}}
// highlight-end
/>
);
};

// all mutation methods are supported.
const authProvider = {
login: async ({ foo, xyz, ...otherProps }) => {
console.log(foo); // bar
console.log(xyz); // abc
// ...
},
register: async ({ foo, xyz, ...otherProps }) => {
console.log(foo); // bar
console.log(xyz); // abc
// ...
},
// ...
};
```

[Resolves #6431](https://github.com/refinedev/refine/issues/6431)
15 changes: 15 additions & 0 deletions .changeset/early-pets-march.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
"@refinedev/antd": minor
---

chore: update `@ant-design/icons` and `@ant-design/pro-layout` versions

Updated previously pinned versions of `@ant-design/icons` from `5.0.1` and `@ant-design/pro-layout` from `7.17.12` to latest versions. This minor update resolves the previous issues with `React@18` types and conflicting type ranges with `@ant-design/pro-layout` package.

After `@ant-design/icons` version `5.4.0` build issues and type issues are resolved. Following this release `@ant-design/pro-layout` also updated its dependency range to match the latest `@ant-design/icons` version.

Previously `@ant-design/icons` were pinned to `5.0.1` and recommended to pin in projects as well. After this update, you may also need to update the `@ant-design/icons` version in your project to match the latest version. (A range above `^5.5.1` is required to match `@refinedev/antd`).

[Resolves #6363](https://github.com/refinedev/refine/issues/6363)
[Resolves #5931 - previously resolved by #5934](https://github.com/refinedev/refine/issues/5931)
[Accompanies #6354 - `@ant-design/pro-layout` also depends on `express` dependency and updated its version in the latest release](https://github.com/refinedev/refine/pull/6354)
9 changes: 9 additions & 0 deletions .changeset/eight-drinks-compare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@refinedev/react-hook-form": patch
---

fix: onChange handler `autoSave` check in `useForm`

Autosave can now be explicitly disabled.

Resolves #6458
7 changes: 7 additions & 0 deletions .changeset/hip-spies-end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@refinedev/inferencer": patch
---

chore: update `@ant-design/icons` version to match `@refinedev/antd`.

This is a patch release to update the `@ant-design/icons` version to match the `@refinedev/antd` version. Previously `@ant-design/icons` were pinned to `5.0.1` version to avoid conflicts with `React@18` and `@ant-design/pro-layout` packages. After `5.4.0` these issues are resolved and we can safely update the version to latest range.
9 changes: 9 additions & 0 deletions .changeset/red-cups-decide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@refinedev/core": minor
---

feat: exported useInvalidateAuthStore hook from auth hooks

Now you can invalide the users identity state and force a react query refresh using this hook

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

feat: Added `MetaContext` to share data between components, providers, and hooks.

> 🚨 Designed for internal use only.
17 changes: 17 additions & 0 deletions .changeset/three-cameras-hope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
"@refinedev/core": patch
---

fix: Added more flexibility to the [`<Link />`](https://refine.dev/docs/routing/components/link/) component's `ref` type by changing it from `HTMLAnchorElement` to `Element`.
From now on, we can pass any type of `ref` to the [`<Link />`](https://refine.dev/docs/routing/components/link/) component.

```tsx
// Before fix - Only worked with HTMLAnchorElement
const ref = useRef<HTMLAnchorElement>(null);

// After fix - Works with any Element type
const ref = useRef<HTMLDivElement>(null);
const ref = useRef<HTMLSpanElement>(null);
```

Resolves [#6463](https://github.com/refinedev/refine/issues/6463)
16 changes: 16 additions & 0 deletions .changeset/unlucky-spoons-shout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
"@refinedev/core": patch
---

fix: Priority logic between `to` and `go` props in [`Link`](https://refine.dev/docs/routing/components/link/) component.
From now on, the `to` prop has priority over the `go` prop. If both are passed, the `to` prop will be used.

```tsx
// Before fix - go would override to
<Link to="/posts" go={{ resource: "categories" }} />

// After fix - to overrides go
<Link to="/posts" go={{ resource: "categories" }} />
```

Resolves [#6461](https://github.com/refinedev/refine/issues/6461)
35 changes: 35 additions & 0 deletions documentation/docs/authentication/components/auth-page/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,41 @@ const MyLoginPage = () => {
};
```

### mutationVariables

`mutationVariables` is used to pass additional variables to the `authProvider` methods.

```tsx
const MyLoginPage = () => {
return (
<AuthPage
type="login" // all other types are also supported.
// highlight-start
mutationVariables={{
foo: "bar",
xyz: "abc",
}}
// highlight-end
/>
);
};

// all mutation methods are supported.
const authProvider = {
login: async ({ foo, xyz, ...otherProps }) => {
console.log(foo); // bar
console.log(xyz); // abc
// ...
},
register: async ({ foo, xyz, ...otherProps }) => {
console.log(foo); // bar
console.log(xyz); // abc
// ...
},
// ...
};
```

## API Reference

### Properties
Expand Down
1 change: 1 addition & 0 deletions documentation/docs/routing/components/link/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: <Link />
source: packages/core/src/components/link/index.tsx
---

`<Link />` is a component that is used to navigate to different pages in your application.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,41 @@ const MyLoginPage = () => {
};
```

### mutationVariables

`mutationVariables` is used to pass additional variables to the `authProvider` methods.

```tsx
const MyLoginPage = () => {
return (
<AuthPage
type="login" // all other types are also supported.
// highlight-start
mutationVariables={{
foo: "bar",
xyz: "abc",
}}
// highlight-end
/>
);
};

// all mutation methods are supported.
const authProvider = {
login: async ({ foo, xyz, ...otherProps }) => {
console.log(foo); // bar
console.log(xyz); // abc
// ...
},
register: async ({ foo, xyz, ...otherProps }) => {
console.log(foo); // bar
console.log(xyz); // abc
// ...
},
// ...
};
```

## FAQ

### How can I remove the default title and logo ?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,41 @@ const MyLoginPage = () => {
};
```

### mutationVariables

`mutationVariables` is used to pass additional variables to the `authProvider` methods.

```tsx
const MyLoginPage = () => {
return (
<AuthPage
type="login" // all other types are also supported.
// highlight-start
mutationVariables={{
foo: "bar",
xyz: "abc",
}}
// highlight-end
/>
);
};

// all mutation methods are supported.
const authProvider = {
login: async ({ foo, xyz, ...otherProps }) => {
console.log(foo); // bar
console.log(xyz); // abc
// ...
},
register: async ({ foo, xyz, ...otherProps }) => {
console.log(foo); // bar
console.log(xyz); // abc
// ...
},
// ...
};
```

## API Reference

### Properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,41 @@ const MyLoginPage = () => {
};
```

### mutationVariables

`mutationVariables` is used to pass additional variables to the `authProvider` methods.

```tsx
const MyLoginPage = () => {
return (
<AuthPage
type="login" // all other types are also supported.
// highlight-start
mutationVariables={{
foo: "bar",
xyz: "abc",
}}
// highlight-end
/>
);
};

// all mutation methods are supported.
const authProvider = {
login: async ({ foo, xyz, ...otherProps }) => {
console.log(foo); // bar
console.log(xyz); // abc
// ...
},
register: async ({ foo, xyz, ...otherProps }) => {
console.log(foo); // bar
console.log(xyz); // abc
// ...
},
// ...
};
```

## API Reference

### Properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -967,6 +967,43 @@ const MyLoginPage = () => {
};
```

### mutationVariables

`mutationVariables` is used to pass additional variables to the `authProvider` methods.

```tsx
import { AuthPage } from "@refinedev/mui";

const MyLoginPage = () => {
return (
<AuthPage
type="login" // all other types are also supported.
// highlight-start
mutationVariables={{
foo: "bar",
xyz: "abc",
}}
// highlight-end
/>
);
};

// all mutation methods are supported.
const authProvider = {
login: async ({ foo, xyz, ...otherProps }) => {
console.log(foo); // bar
console.log(xyz); // abc
// ...
},
register: async ({ foo, xyz, ...otherProps }) => {
console.log(foo); // bar
console.log(xyz); // abc
// ...
},
// ...
};
```

## API Reference

### Properties
Expand Down
2 changes: 1 addition & 1 deletion examples/app-crm-minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"dependencies": {
"@ant-design/cssinjs": "^1.17.2",
"@ant-design/icons": "5.0.1",
"@ant-design/icons": "^5.5.1",
"@ant-design/plots": "^1.2.5",
"@dnd-kit/core": "^6.0.8",
"@dnd-kit/modifiers": "^6.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,5 @@ export const TextIconSvg = () => (
);

export const TextIcon = (props: Partial<CustomIconComponentProps>) => (
// @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
<Icon component={TextIconSvg} {...props} />
);
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ export const AccountSettings = ({ opened, setOpened, userId }: Props) => {
<Text strong>Account Settings</Text>
<Button
type="text"
// @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
icon={<CloseOutlined />}
onClick={() => closeModal()}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ export const CurrentUser = () => {
>
<Button
style={{ textAlign: "left" }}
// @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
icon={<SettingOutlined />}
type="text"
block
Expand Down
Loading
Loading