@refinedev/antd 5.39.0 → 5.40.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 +110 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,115 @@
|
|
1
1
|
# @refinedev/antd
|
2
2
|
|
3
|
+
## 5.40.0
|
4
|
+
|
5
|
+
### Minor Changes
|
6
|
+
|
7
|
+
- [`6bd14228760d3e1e205ea9248e427f9afa2ec046`](https://github.com/refinedev/refine/commit/6bd14228760d3e1e205ea9248e427f9afa2ec046) Thanks [@BatuhanW](https://github.com/BatuhanW)! - feat: use global values by default for app title and app icon
|
8
|
+
|
9
|
+
Now `<Refine />` component accepts `options.title` prop that can be used to set app icon and app name globally. For `<ThemedLayoutV2 />` and `<AuthPage />` components, these values will be used by default. While users can use `options.title` to pass global values for app icon and app name, option to override through `<ThemedTitleV2 />` component is still available for users to override these values in specific use cases.
|
10
|
+
|
11
|
+
```tsx
|
12
|
+
import { Refine } from "@refinedev/core";
|
13
|
+
|
14
|
+
const MyIcon = () => <svg>{/* ... */}</svg>;
|
15
|
+
|
16
|
+
const App = () => {
|
17
|
+
return (
|
18
|
+
<Refine
|
19
|
+
options={{
|
20
|
+
title: {
|
21
|
+
icon: <MyIcon />,
|
22
|
+
text: "Refine App",
|
23
|
+
},
|
24
|
+
}}
|
25
|
+
>
|
26
|
+
{/* ... */}
|
27
|
+
</Refine>
|
28
|
+
);
|
29
|
+
};
|
30
|
+
```
|
31
|
+
|
32
|
+
Then, `<ThemedLayoutV2 />` and `<AuthPage />` components will display `<MyIcon />` and `"Refine App"` as app icon and app name respectively.
|
33
|
+
|
34
|
+
### Patch Changes
|
35
|
+
|
36
|
+
- [`6bd14228760d3e1e205ea9248e427f9afa2ec046`](https://github.com/refinedev/refine/commit/6bd14228760d3e1e205ea9248e427f9afa2ec046) Thanks [@BatuhanW](https://github.com/BatuhanW)! - lock the `ant-design/icons` version to `5.0.1`
|
37
|
+
|
38
|
+
- [`6bd14228760d3e1e205ea9248e427f9afa2ec046`](https://github.com/refinedev/refine/commit/6bd14228760d3e1e205ea9248e427f9afa2ec046) Thanks [@BatuhanW](https://github.com/BatuhanW)! - chore: unpin `antd` version that was causing build issues
|
39
|
+
|
40
|
+
With `antd`'s `5.17.0` version, Next.js apps were stuck in the build process. To prevent this from breaking all Refine apps with Next.js, we've pinned the version to `5.16.5` as a workaround. Since then, the issue has been resolved by updating an internal dependency of `antd`, we no longer need to pin the version.
|
41
|
+
|
42
|
+
- [`6bd14228760d3e1e205ea9248e427f9afa2ec046`](https://github.com/refinedev/refine/commit/6bd14228760d3e1e205ea9248e427f9afa2ec046) Thanks [@BatuhanW](https://github.com/BatuhanW)! - feat(antd): search form in useTable should work with syncWithLocation
|
43
|
+
|
44
|
+
Even though the form is managed by `useTable` hook from `@refinedev/antd`. It wasn't respecting the `syncWithLocation` prop to set values accordingly at initial render when registered fields are matching with the query params. Now it will look for matching fields and set values accordingly from synced filters.
|
45
|
+
|
46
|
+
- [`6bd14228760d3e1e205ea9248e427f9afa2ec046`](https://github.com/refinedev/refine/commit/6bd14228760d3e1e205ea9248e427f9afa2ec046) Thanks [@BatuhanW](https://github.com/BatuhanW)! - fix: Filtering [`<Table />`](https://refine.dev/docs/ui-integrations/ant-design/hooks/use-table/) with [`<FilterDropdown />`](https://refine.dev/docs/ui-integrations/ant-design/components/filter-dropdown) and [`<DatePicker />`](https://ant.design/components/date-picker) doesn't work with `syncWithLocation`. #5933
|
47
|
+
|
48
|
+
feat: Added [`rangePickerFilterMapper`](https://refine.dev/docs/ui-integrations/ant-design/components/filter-dropdown/#rangepickerfiltermapper) utility function to convert `selectedKeys` to satisfy both the Refine and [`<DatePicker.RangePicker />`](https://ant.design/components/date-picker).
|
49
|
+
|
50
|
+
Usage example:
|
51
|
+
|
52
|
+
```tsx
|
53
|
+
import { getDefaultFilter } from "@refinedev/core";
|
54
|
+
import {
|
55
|
+
DateField,
|
56
|
+
FilterDropdown,
|
57
|
+
rangePickerFilterMapper,
|
58
|
+
useTable,
|
59
|
+
} from "@refinedev/antd";
|
60
|
+
import { Table, DatePicker } from "antd";
|
61
|
+
|
62
|
+
export const Posts = () => {
|
63
|
+
const { tableProps, filters } = useTable({
|
64
|
+
filters: {
|
65
|
+
initial: [
|
66
|
+
{
|
67
|
+
field: "created_at",
|
68
|
+
value: ["2022-01-01", "2022-01-31"],
|
69
|
+
operator: "between",
|
70
|
+
},
|
71
|
+
],
|
72
|
+
},
|
73
|
+
});
|
74
|
+
|
75
|
+
return (
|
76
|
+
<Table {...tableProps} rowKey="id">
|
77
|
+
<Table.Column dataIndex="id" title="ID" />
|
78
|
+
<Table.Column dataIndex="title" title="Title" />
|
79
|
+
<Table.Column
|
80
|
+
dataIndex="createdAt"
|
81
|
+
title="Created At"
|
82
|
+
filterDropdown={(props) => (
|
83
|
+
<FilterDropdown
|
84
|
+
{...props}
|
85
|
+
mapValue={(selectedKeys, event) => {
|
86
|
+
return rangePickerFilterMapper(selectedKeys, event);
|
87
|
+
}}
|
88
|
+
>
|
89
|
+
<DatePicker.RangePicker />
|
90
|
+
</FilterDropdown>
|
91
|
+
)}
|
92
|
+
defaultFilteredValue={getDefaultFilter(
|
93
|
+
"created_at",
|
94
|
+
filters,
|
95
|
+
"between",
|
96
|
+
)}
|
97
|
+
/>
|
98
|
+
</Table>
|
99
|
+
);
|
100
|
+
};
|
101
|
+
```
|
102
|
+
|
103
|
+
- [`6bd14228760d3e1e205ea9248e427f9afa2ec046`](https://github.com/refinedev/refine/commit/6bd14228760d3e1e205ea9248e427f9afa2ec046) Thanks [@BatuhanW](https://github.com/BatuhanW)! - chore: added `type` qualifier to imports used as type only.
|
104
|
+
|
105
|
+
```diff
|
106
|
+
- import { A } from "./example.ts";
|
107
|
+
+ import type { A } from "./example.ts";
|
108
|
+
```
|
109
|
+
|
110
|
+
- Updated dependencies [[`6bd14228760d3e1e205ea9248e427f9afa2ec046`](https://github.com/refinedev/refine/commit/6bd14228760d3e1e205ea9248e427f9afa2ec046), [`6bd14228760d3e1e205ea9248e427f9afa2ec046`](https://github.com/refinedev/refine/commit/6bd14228760d3e1e205ea9248e427f9afa2ec046)]:
|
111
|
+
- @refinedev/ui-types@1.22.9
|
112
|
+
|
3
113
|
## 5.39.0
|
4
114
|
|
5
115
|
### Minor Changes
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@refinedev/antd",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.40.0",
|
4
4
|
"private": false,
|
5
5
|
"description": "refine is a React-based framework for building internal tools, rapidly. It ships with Ant Design System, an enterprise-level UI toolkit.",
|
6
6
|
"repository": {
|
@@ -35,7 +35,7 @@
|
|
35
35
|
"dependencies": {
|
36
36
|
"@ant-design/icons": "5.0.1",
|
37
37
|
"@ant-design/pro-layout": "7.17.12",
|
38
|
-
"@refinedev/ui-types": "^1.22.
|
38
|
+
"@refinedev/ui-types": "^1.22.9",
|
39
39
|
"@tanstack/react-query": "^4.10.1",
|
40
40
|
"antd": "^5.17.0",
|
41
41
|
"dayjs": "^1.10.7",
|
@@ -46,9 +46,9 @@
|
|
46
46
|
},
|
47
47
|
"devDependencies": {
|
48
48
|
"@esbuild-plugins/node-resolve": "^0.1.4",
|
49
|
-
"@refinedev/cli": "^2.16.
|
50
|
-
"@refinedev/core": "^4.
|
51
|
-
"@refinedev/ui-tests": "^1.14.
|
49
|
+
"@refinedev/cli": "^2.16.33",
|
50
|
+
"@refinedev/core": "^4.51.0",
|
51
|
+
"@refinedev/ui-tests": "^1.14.7",
|
52
52
|
"@testing-library/jest-dom": "^5.16.4",
|
53
53
|
"@testing-library/react": "^13.1.1",
|
54
54
|
"@testing-library/react-hooks": "^8.0.0",
|