@refinedev/antd 5.36.1 → 5.36.3
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 +16 -0
- package/README.md +31 -211
- package/dist/iife/index.js +6 -6
- package/dist/iife/index.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
# @refinedev/antd
|
2
2
|
|
3
|
+
## 5.36.3
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- [#5022](https://github.com/refinedev/refine/pull/5022) [`80513a4e42f`](https://github.com/refinedev/refine/commit/80513a4e42f8dda39e01157643594a9e4c32001b) Thanks [@BatuhanW](https://github.com/BatuhanW)! - chore: update README.md
|
8
|
+
|
9
|
+
- fix grammar errors.
|
10
|
+
- make all README.md files consistent.
|
11
|
+
- add code example code snippets.
|
12
|
+
|
13
|
+
## 5.36.2
|
14
|
+
|
15
|
+
### Patch Changes
|
16
|
+
|
17
|
+
- [#4964](https://github.com/refinedev/refine/pull/4964) [`85b1ac0db5f`](https://github.com/refinedev/refine/commit/85b1ac0db5f8e61c7a78137aed0adf4bf2871848) Thanks [@BatuhanW](https://github.com/BatuhanW)! - chore: update @refinedev/core peer dependency versions.
|
18
|
+
|
3
19
|
## 5.36.1
|
4
20
|
|
5
21
|
### Patch Changes
|
package/README.md
CHANGED
@@ -1,11 +1,10 @@
|
|
1
|
-
<br/>
|
2
|
-
|
3
1
|
<div align="center" style="margin: 30px;">
|
4
|
-
<a href="https://refine.dev
|
5
|
-
|
6
|
-
</a>
|
7
|
-
|
8
|
-
|
2
|
+
<a href="https://refine.dev">
|
3
|
+
<img src="https://refine.ams3.cdn.digitaloceanspaces.com/refine_logo.png" align="center" />
|
4
|
+
</a>
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<br/>
|
9
8
|
|
10
9
|
<div align="center">
|
11
10
|
<a href="https://refine.dev">Home Page</a> |
|
@@ -13,253 +12,74 @@
|
|
13
12
|
<a href="https://refine.dev/examples/">Examples</a> |
|
14
13
|
<a href="https://refine.dev/blog/">Blog</a> |
|
15
14
|
<a href="https://refine.dev/docs/">Documentation</a>
|
16
|
-
</div>
|
17
|
-
</div>
|
18
|
-
|
19
|
-
<br />
|
20
15
|
|
21
|
-
<
|
22
|
-
|
23
|
-
<br />
|
24
|
-
<br />
|
16
|
+
<br/>
|
17
|
+
<br/>
|
25
18
|
|
26
19
|
[](https://discord.gg/refine)
|
27
20
|
[](https://twitter.com/refine_dev)
|
28
21
|
|
22
|
+
|
29
23
|
<a href="https://www.producthunt.com/posts/refine-3?utm_source=badge-top-post-badge&utm_medium=badge&utm_souce=badge-refine-3" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=362220&theme=light&period=daily" alt="refine - 100% open source React framework to build web apps 3x faster | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
|
30
24
|
|
31
25
|
</div>
|
32
26
|
|
33
|
-
<div align="center">
|
34
|
-
|
35
|
-
[](https://github.com/refinedev/awesome-refine)
|
36
|
-
[](https://codeclimate.com/github/pankod/refine/maintainability)
|
37
|
-
[](https://codeclimate.com/github/pankod/refine/test_coverage)
|
38
|
-
[](https://www.npmjs.com/package/@refinedev/core)
|
39
|
-
[](https://www.npmjs.com/package/@refinedev/core)
|
40
|
-
[](https://github.com/refinedev/refine/commits/next)
|
41
|
-
[](CODE_OF_CONDUCT.md)
|
42
|
-
|
43
|
-
</div>
|
44
27
|
|
45
28
|
<br/>
|
46
|
-
<a href="https://refine.dev/">
|
47
|
-
<picture>
|
48
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/18739364/200257042-3f2aa7f7-a07f-4824-8d2a-b25f26b6fd32.png">
|
49
|
-
<img alt="how-works-refine" src="https://user-images.githubusercontent.com/18739364/200257209-8fc0c8b1-2568-453e-873f-00513434deed.png">
|
50
|
-
</picture>
|
51
|
-
</a>
|
52
|
-
|
53
|
-
## What is refine?
|
54
29
|
|
55
|
-
**refine** is a React-based framework for the rapid ✨ development of web applications.
|
56
|
-
It eliminates repetitive tasks demanded by **CRUD** operations and provides industry standard solutions for critical parts like **authentication**, **access control**, **routing**, **networking**, **state management**, and **i18n**.
|
57
30
|
|
58
|
-
**refine** is _headless by design_, thereby offering unlimited styling and customization options.
|
59
31
|
|
60
|
-
## What do you mean by "headless" ?
|
61
32
|
|
62
|
-
Instead of being a limited set of pre-styled components, **refine** is a collection of helper `hooks`, `components`, and `providers`. They are all decoupled from _UI components_ and _business logic_, so that they never keep you from customizing your _UI_ or coding your own flow.
|
63
33
|
|
64
|
-
**refine** seamlessly works with any **custom design** or **UI framework** that you favor. For convenience, it ships with ready-made integrations for [Ant Design System](https://ant.design/), [Material UI](https://mui.com/material-ui/getting-started/overview/), [Mantine](https://mantine.dev/), and [Chakra UI](https://chakra-ui.com/).
|
65
34
|
|
66
|
-
|
35
|
+
<div align="center">refine is an open-source, headless React framework for developers building enterprise internal tools, admin panels, dashboards, B2B applications.
|
67
36
|
|
68
|
-
**refine** shines on _data-intensive⚡_ applications like **admin panels**, **dashboards** and **internal tools**. Thanks to the built-in **SSR support**, **refine** can also power _customer-facing_ applications like **storefronts**.
|
69
|
-
|
70
|
-
You can take a look at some live examples that can be built using **refine** from scratch:
|
71
|
-
|
72
|
-
<a href="https://s.refine.dev/readme-admin-panel" target="_blank">
|
73
|
-
<img src="https://user-images.githubusercontent.com/18739364/204285956-cc20fa11-b769-4bd5-b8f6-9c05a283ac85.gif" style="width:267px;" />
|
74
|
-
</a>
|
75
|
-
|
76
|
-
<a href="https://s.refine.dev/readme-medium-clone" target="_blank">
|
77
|
-
<img src="https://user-images.githubusercontent.com/18739364/204285047-8f24f1f4-65ea-4952-83ed-81e92cdd5b90.gif" style="width:200px;" />
|
78
|
-
</a>
|
79
|
-
|
80
|
-
<a href="https://s.refine.dev/readme-ssr-storefront" target="_blank">
|
81
|
-
<img src="https://user-images.githubusercontent.com/18739364/204285039-1ce0cb06-fbf8-4704-89c9-2e004620c9a8.gif" style="width:200px;" />
|
82
|
-
</a>
|
83
|
-
|
84
|
-
<br/>
|
85
37
|
<br/>
|
86
38
|
|
87
|
-
|
88
|
-
|
89
|
-
[👉 More **refine** powered different usage scenarios can be found here](https://refine.dev/docs/examples/)
|
90
|
-
|
91
|
-
## Key Features
|
39
|
+
It eliminates repetitive tasks in CRUD operations and provides industry-standard solutions for critical project components like **authentication**, **access control**, **routing**, **networking**, **state management**, and **i18n**.
|
92
40
|
|
93
|
-
|
94
|
-
|
95
|
-
🔌 Connectors for **15+ backend services** including [REST API](https://github.com/refinedev/refine/tree/master/packages/simple-rest), [GraphQL](https://github.com/refinedev/refine/tree/master/packages/graphql), [NestJs CRUD](https://github.com/refinedev/refine/tree/master/packages/nestjsx-crud), [Airtable](https://github.com/refinedev/refine/tree/master/packages/airtable), [Strapi](https://github.com/refinedev/refine/tree/master/packages/strapi), [Strapi v4](https://github.com/refinedev/refine/tree/master/packages/strapi-v4), [Strapi GraphQL](https://github.com/refinedev/refine/tree/master/packages/strapi-graphql), [Supabase](https://github.com/refinedev/refine/tree/master/packages/supabase), [Hasura](https://github.com/refinedev/refine/tree/master/packages/hasura), [Appwrite](https://github.com/refinedev/refine/tree/master/packages/appwrite), [Firebase](https://firebase.google.com/), [Nestjs-Query](https://github.com/refinedev/refine/tree/master/packages/nestjs-query) and [Directus](https://directus.io/).
|
96
|
-
|
97
|
-
🌐 **SSR support** with **Next.js** or **Remix**
|
98
|
-
|
99
|
-
🔍 Auto-generated **CRUD** UIs from **your API data structure**
|
100
|
-
|
101
|
-
⚛ Perfect **state management** & **mutations** with **React Query**
|
102
|
-
|
103
|
-
🔀 **Advanced routing** with any router library of your choice
|
41
|
+
</div>
|
104
42
|
|
105
|
-
🔐 Providers for seamless **authentication** and **access control** flows
|
106
43
|
|
107
|
-
⚡ Out-of-the-box support for **live / real-time applications**
|
108
44
|
|
109
|
-
📄 Easy **audit logs** & **document versioning**
|
110
45
|
|
111
|
-
|
46
|
+
# Ant Design integration for refine
|
112
47
|
|
113
|
-
|
48
|
+
[Ant Design](https://ant.design/) is a React.js UI library that contains easy-to-use components that are useful for building interactive user interfaces.
|
114
49
|
|
115
|
-
|
50
|
+
[refine](https://refine.dev/) is **headless by design**, offering unlimited styling and customization options. Moreover, refine ships with ready-made integrations for [Ant Design](https://ant.design/), [Material UI](https://mui.com/material-ui/getting-started/overview/), [Mantine](https://mantine.dev/), and [Chakra UI](https://chakra-ui.com/) for convenience.
|
116
51
|
|
117
|
-
|
52
|
+
refine has connectors for 15+ backend services, including REST API, [GraphQL](https://graphql.org/), and popular services like [Airtable](https://www.airtable.com/), [Strapi](https://strapi.io/), [Supabase](https://supabase.com/), [Firebase](https://firebase.google.com/), and [NestJS](https://nestjs.com/).
|
118
53
|
|
119
|
-
## Quick Start
|
120
54
|
|
121
|
-
The fastest way to get started with **refine** is by using the `create refine-app` project starter tool.
|
122
|
-
Run the following command to create a new **refine** project configured with [Ant Design System](https://ant.design/) as the default UI framework:
|
123
55
|
|
124
|
-
```
|
125
|
-
npm create refine-app@latest -- --preset refine-antd
|
126
|
-
```
|
127
56
|
|
128
|
-
|
57
|
+
## Installation & Usage
|
129
58
|
|
130
59
|
```
|
131
|
-
npm
|
60
|
+
npm install @refinedev/antd antd
|
132
61
|
```
|
133
62
|
|
134
|
-
<br/>
|
135
|
-
|
136
|
-
Your **refine** application will be accessible at [http://localhost:3000](http://localhost:3000):
|
137
|
-
|
138
|
-
<a href="http://localhost:3000"></a>
|
139
|
-
|
140
|
-
<br/>
|
141
|
-
|
142
|
-
Let's consume a public `fake REST API` and add two resources (_blog_posts_, _categories_) to our project. Replace the contents of `src/App.tsx` with the following code:
|
143
|
-
|
144
|
-
```tsx title="src/App.tsx"
|
145
|
-
import { Refine } from "@refinedev/core";
|
146
|
-
import {
|
147
|
-
notificationProvider,
|
148
|
-
ErrorComponent,
|
149
|
-
ThemedLayout,
|
150
|
-
} from "@refinedev/antd";
|
151
|
-
import routerProvider, { NavigateToResource } from "@refinedev/react-router-v6";
|
152
|
-
import dataProvider from "@refinedev/simple-rest";
|
153
63
|
|
154
|
-
|
155
|
-
|
156
|
-
import { AntdInferencer } from "@refinedev/inferencer/antd";
|
64
|
+
```tsx
|
65
|
+
import { ThemedLayoutV2 } from "@refinedev/antd";
|
157
66
|
|
158
67
|
import "@refinedev/antd/dist/reset.css";
|
159
68
|
|
160
|
-
const App
|
69
|
+
const App = () => {
|
161
70
|
return (
|
162
|
-
<
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
resources={[
|
168
|
-
{
|
169
|
-
name: "blog_posts",
|
170
|
-
list: "/blog-posts",
|
171
|
-
show: "/blog-posts/show/:id",
|
172
|
-
create: "/blog-posts/create",
|
173
|
-
edit: "/blog-posts/edit/:id",
|
174
|
-
meta: { canDelete: true },
|
175
|
-
},
|
176
|
-
{
|
177
|
-
name: "categories",
|
178
|
-
list: "/categories",
|
179
|
-
show: "/categories/show/:id",
|
180
|
-
},
|
181
|
-
]}
|
182
|
-
>
|
183
|
-
<Routes>
|
184
|
-
<Route
|
185
|
-
element={
|
186
|
-
<ThemedLayout>
|
187
|
-
<Outlet />
|
188
|
-
</ThemedLayout>
|
189
|
-
}
|
190
|
-
>
|
191
|
-
<Route index element={<NavigateToResource />} />
|
192
|
-
<Route path="blog-posts">
|
193
|
-
<Route index element={<AntdInferencer />} />
|
194
|
-
<Route
|
195
|
-
path="show/:id"
|
196
|
-
element={<AntdInferencer />}
|
197
|
-
/>
|
198
|
-
<Route path="create" element={<AntdInferencer />} />
|
199
|
-
<Route
|
200
|
-
path="edit/:id"
|
201
|
-
element={<AntdInferencer />}
|
202
|
-
/>
|
203
|
-
</Route>
|
204
|
-
<Route path="categories">
|
205
|
-
<Route index element={<AntdInferencer />} />
|
206
|
-
<Route
|
207
|
-
path="show/:id"
|
208
|
-
element={<AntdInferencer />}
|
209
|
-
/>
|
210
|
-
</Route>
|
211
|
-
<Route path="*" element={<ErrorComponent />} />
|
212
|
-
</Route>
|
213
|
-
</Routes>
|
214
|
-
</Refine>
|
215
|
-
</BrowserRouter>
|
71
|
+
<Refine
|
72
|
+
/* ... */
|
73
|
+
>
|
74
|
+
<ThemedLayoutV2>{/* ... */}</ThemedLayoutV2>
|
75
|
+
</Refine>
|
216
76
|
);
|
217
77
|
};
|
218
|
-
|
219
|
-
export default App;
|
220
78
|
```
|
221
79
|
|
222
|
-
|
223
|
-
|
224
|
-
🚀 Thanks to **refine Inferencer package**, it guesses the configuration to use for the `list`, `show`, `create`, and `edit` pages based on the data fetched from the API and generates the pages automatically.
|
225
|
-
|
226
|
-
Now, you should see the output as a table populated with `blog_post` & `category` data:
|
227
|
-
|
228
|
-

|
229
|
-
|
230
|
-
<br/>
|
231
|
-
|
232
|
-
You can get the auto-generated pages codes by clicking the `Show Code` button on each page. Afterward, simply pass the pages to the `resources` array by replacing with the Inferencer components.
|
233
|
-
|
234
|
-
## Next Steps
|
235
|
-
|
236
|
-
👉 Jump to [Tutorial](https://refine.dev/docs/tutorial/introduction/index/) to continue your work and turn the example into a full-blown CRUD application.
|
237
|
-
|
238
|
-
👉 Visit [Learn the Basics Page](https://refine.dev/docs/getting-started/overview/) to get informed about the fundamental concepts.
|
239
|
-
|
240
|
-
👉 Read more on [Advanced Tutorials
|
241
|
-
](https://refine.dev/docs/advanced-tutorials/) for different usage scenarios.
|
242
|
-
|
243
|
-
👉 See the real-life [Finefoods Demo](https://refine.dev/demo/) project.
|
244
|
-
|
245
|
-
👉 Play with interactive [Examples](https://refine.dev/docs/examples/)
|
246
|
-
|
247
|
-
## Stargazers
|
248
|
-
|
249
|
-
[](https://github.com/refinedev/refine/stargazers)
|
250
|
-
|
251
|
-
## Contribution
|
252
|
-
|
253
|
-
[👉 Refer to contribution docs for more information](https://refine.dev/docs/contributing/#ways-to-contribute)
|
254
|
-
|
255
|
-
If you have any doubts related to the project or want to discuss something, then join our [Discord Server](https://discord.gg/refine).
|
256
|
-
|
257
|
-
## Our ♥️ Contributors
|
258
|
-
|
259
|
-
<a href="https://github.com/refinedev/refine/graphs/contributors">
|
260
|
-
<img src="https://contrib.rocks/image?repo=refinedev/refine" />
|
261
|
-
</a>
|
262
|
-
|
263
|
-
## License
|
80
|
+
## Documentation
|
264
81
|
|
265
|
-
|
82
|
+
- For more detailed information and usage, refer to the [refine Ant Design documentation](https://refine.dev/docs/api-reference/antd/).
|
83
|
+
- [Refer to complete refine tutorial with Ant Design](https://refine.dev/docs/tutorial/introduction/select-framework/)
|
84
|
+
- [Refer to documentation for more info about refine](https://refine.dev/docs/).
|
85
|
+
- [Step up to refine tutorials](https://refine.dev/docs/tutorial/introduction/index/).
|