@refinedev/antd 5.37.4 → 5.37.5
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 +1760 -1778
- package/dist/components/autoSaveIndicator/index.d.ts.map +1 -1
- package/dist/components/breadcrumb/index.d.ts.map +1 -1
- package/dist/components/buttons/create/index.d.ts.map +1 -1
- package/dist/components/buttons/delete/index.d.ts.map +1 -1
- package/dist/components/buttons/import/index.d.ts.map +1 -1
- package/dist/components/buttons/types.d.ts.map +1 -1
- package/dist/components/crud/edit/index.d.ts.map +1 -1
- package/dist/components/crud/list/index.d.ts.map +1 -1
- package/dist/components/crud/show/index.d.ts.map +1 -1
- package/dist/components/crud/types.d.ts.map +1 -1
- package/dist/components/fields/types.d.ts.map +1 -1
- package/dist/components/layout/sider/index.d.ts.map +1 -1
- package/dist/components/layout/title/index.d.ts.map +1 -1
- package/dist/components/layout/types.d.ts.map +1 -1
- package/dist/components/pageHeader/index.d.ts.map +1 -1
- package/dist/components/pages/auth/components/forgotPassword/index.d.ts.map +1 -1
- package/dist/components/pages/auth/components/login/index.d.ts.map +1 -1
- package/dist/components/pages/auth/components/register/index.d.ts.map +1 -1
- package/dist/components/pages/auth/components/updatePassword/index.d.ts.map +1 -1
- package/dist/components/pages/auth/index.d.ts.map +1 -1
- package/dist/components/pages/login/index.d.ts.map +1 -1
- package/dist/components/pages/ready/index.d.ts.map +1 -1
- package/dist/components/table/components/filterDropdown/index.d.ts.map +1 -1
- package/dist/components/themedLayout/header/index.d.ts.map +1 -1
- package/dist/components/themedLayout/types.d.ts.map +1 -1
- package/dist/components/themedLayoutV2/header/index.d.ts.map +1 -1
- package/dist/components/themedLayoutV2/index.d.ts.map +1 -1
- package/dist/components/themedLayoutV2/sider/index.d.ts.map +1 -1
- package/dist/components/themedLayoutV2/types.d.ts.map +1 -1
- package/dist/components/undoableNotification/index.d.ts.map +1 -1
- package/dist/contexts/index.d.ts.map +1 -1
- package/dist/contexts/themedLayoutContext/IThemedLayoutContext.d.ts.map +1 -1
- package/dist/contexts/themedLayoutContext/index.d.ts.map +1 -1
- package/dist/definitions/table/index.d.ts.map +1 -1
- package/dist/definitions/themes/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/hooks/fields/useCheckboxGroup/index.d.ts.map +1 -1
- package/dist/hooks/fields/useRadioGroup/index.d.ts.map +1 -1
- package/dist/hooks/fields/useSelect/index.d.ts.map +1 -1
- package/dist/hooks/form/index.d.ts.map +1 -1
- package/dist/hooks/form/useDrawerForm/index.d.ts.map +1 -1
- package/dist/hooks/form/useDrawerForm/useDrawerForm.d.ts.map +1 -1
- package/dist/hooks/form/useForm.d.ts.map +1 -1
- package/dist/hooks/form/useModalForm/index.d.ts.map +1 -1
- package/dist/hooks/form/useModalForm/useModalForm.d.ts.map +1 -1
- package/dist/hooks/form/useStepsForm/index.d.ts.map +1 -1
- package/dist/hooks/form/useStepsForm/useStepsForm.d.ts.map +1 -1
- package/dist/hooks/import/index.d.ts.map +1 -1
- package/dist/hooks/list/useSimpleList/useSimpleList.d.ts.map +1 -1
- package/dist/hooks/modal/useModal/index.d.ts.map +1 -1
- package/dist/hooks/table/useEditableTable/useEditableTable.d.ts.map +1 -1
- package/dist/hooks/table/useTable/paginationLink.d.ts.map +1 -1
- package/dist/hooks/table/useTable/useTable.d.ts.map +1 -1
- package/dist/hooks/useFileUploadState/index.d.ts.map +1 -1
- package/dist/hooks/useSiderVisible/index.d.ts.map +1 -1
- package/dist/iife/index.js +10 -10
- package/dist/iife/index.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/interfaces/field.d.ts.map +1 -1
- package/dist/interfaces/index.d.ts.map +1 -1
- package/dist/interfaces/upload.d.ts.map +1 -1
- package/package.json +32 -32
- package/refine.config.js +497 -524
- package/src/components/autoSaveIndicator/index.tsx +69 -69
- package/src/components/breadcrumb/index.tsx +63 -65
- package/src/components/buttons/clone/index.tsx +86 -86
- package/src/components/buttons/create/index.tsx +85 -86
- package/src/components/buttons/delete/index.tsx +114 -119
- package/src/components/buttons/edit/index.tsx +86 -86
- package/src/components/buttons/export/index.tsx +17 -17
- package/src/components/buttons/import/index.tsx +19 -20
- package/src/components/buttons/list/index.tsx +105 -105
- package/src/components/buttons/refresh/index.tsx +50 -50
- package/src/components/buttons/save/index.tsx +17 -17
- package/src/components/buttons/show/index.tsx +86 -86
- package/src/components/buttons/types.ts +20 -20
- package/src/components/crud/create/index.tsx +120 -120
- package/src/components/crud/edit/index.tsx +205 -207
- package/src/components/crud/list/index.tsx +88 -90
- package/src/components/crud/show/index.tsx +175 -185
- package/src/components/crud/types.ts +41 -56
- package/src/components/fields/boolean/index.tsx +11 -11
- package/src/components/fields/date/index.tsx +13 -13
- package/src/components/fields/email/index.tsx +5 -5
- package/src/components/fields/file/index.tsx +8 -8
- package/src/components/fields/image/index.tsx +4 -4
- package/src/components/fields/markdown/index.tsx +9 -9
- package/src/components/fields/number/index.tsx +17 -17
- package/src/components/fields/tag/index.tsx +1 -1
- package/src/components/fields/text/index.tsx +1 -1
- package/src/components/fields/types.ts +18 -18
- package/src/components/fields/url/index.tsx +8 -8
- package/src/components/layout/header/index.tsx +25 -25
- package/src/components/layout/index.tsx +30 -30
- package/src/components/layout/sider/index.tsx +238 -246
- package/src/components/layout/sider/styles.ts +5 -5
- package/src/components/layout/title/index.tsx +40 -40
- package/src/components/layout/types.ts +6 -6
- package/src/components/pageHeader/index.tsx +44 -44
- package/src/components/pages/auth/components/forgotPassword/index.tsx +177 -180
- package/src/components/pages/auth/components/login/index.tsx +258 -271
- package/src/components/pages/auth/components/register/index.tsx +247 -263
- package/src/components/pages/auth/components/styles.ts +16 -16
- package/src/components/pages/auth/components/updatePassword/index.tsx +160 -174
- package/src/components/pages/auth/index.tsx +23 -23
- package/src/components/pages/error/index.tsx +57 -57
- package/src/components/pages/login/index.tsx +120 -146
- package/src/components/pages/login/styles.ts +12 -12
- package/src/components/pages/ready/index.tsx +72 -80
- package/src/components/pages/welcome/index.tsx +1 -1
- package/src/components/table/components/filterDropdown/index.tsx +89 -92
- package/src/components/themedLayout/header/index.tsx +28 -32
- package/src/components/themedLayout/index.tsx +30 -30
- package/src/components/themedLayout/sider/index.tsx +279 -279
- package/src/components/themedLayout/sider/styles.ts +5 -5
- package/src/components/themedLayout/title/index.tsx +66 -66
- package/src/components/themedLayout/types.ts +8 -8
- package/src/components/themedLayoutV2/header/index.tsx +37 -41
- package/src/components/themedLayoutV2/index.tsx +34 -36
- package/src/components/themedLayoutV2/sider/index.tsx +309 -313
- package/src/components/themedLayoutV2/sider/styles.ts +5 -5
- package/src/components/themedLayoutV2/title/index.tsx +66 -66
- package/src/components/themedLayoutV2/types.ts +9 -9
- package/src/components/undoableNotification/index.tsx +31 -31
- package/src/contexts/index.ts +2 -2
- package/src/contexts/themedLayoutContext/IThemedLayoutContext.ts +4 -4
- package/src/contexts/themedLayoutContext/index.tsx +22 -22
- package/src/definitions/table/index.ts +81 -82
- package/src/definitions/themes/index.ts +35 -35
- package/src/definitions/upload/index.ts +17 -17
- package/src/hooks/fields/useCheckboxGroup/index.ts +64 -64
- package/src/hooks/fields/useRadioGroup/index.ts +60 -63
- package/src/hooks/fields/useSelect/index.ts +30 -30
- package/src/hooks/form/index.ts +10 -10
- package/src/hooks/form/useDrawerForm/index.ts +4 -4
- package/src/hooks/form/useDrawerForm/useDrawerForm.ts +257 -261
- package/src/hooks/form/useForm.ts +256 -259
- package/src/hooks/form/useModalForm/index.ts +3 -3
- package/src/hooks/form/useModalForm/useModalForm.ts +289 -295
- package/src/hooks/form/useStepsForm/index.ts +3 -3
- package/src/hooks/form/useStepsForm/useStepsForm.ts +96 -96
- package/src/hooks/import/index.tsx +104 -106
- package/src/hooks/list/useSimpleList/useSimpleList.ts +179 -185
- package/src/hooks/modal/useModal/index.tsx +24 -24
- package/src/hooks/table/useEditableTable/useEditableTable.ts +85 -85
- package/src/hooks/table/useTable/paginationLink.tsx +17 -17
- package/src/hooks/table/useTable/useTable.ts +199 -205
- package/src/hooks/useFileUploadState/index.ts +20 -20
- package/src/hooks/useSiderVisible/index.ts +16 -16
- package/src/hooks/useThemedLayoutContext/index.ts +12 -12
- package/src/index.tsx +4 -4
- package/src/interfaces/field.ts +1 -1
- package/src/interfaces/index.ts +7 -8
- package/src/interfaces/upload.ts +7 -7
- package/src/providers/notificationProvider/index.tsx +78 -78
- package/src/types/index.d.ts +2 -2
- package/src/types/sunflower.d.ts +68 -68
- package/tsconfig.json +26 -26
package/refine.config.js
CHANGED
@@ -1,411 +1,399 @@
|
|
1
1
|
const { dirname, join } = require("path");
|
2
2
|
const {
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
getImports,
|
4
|
+
appendAfterImports,
|
5
|
+
getFileContent,
|
6
6
|
} = require("@refinedev/cli");
|
7
7
|
|
8
8
|
/** @type {import('@refinedev/cli').RefineConfig} */
|
9
9
|
module.exports = {
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
10
|
+
group: "UI Framework",
|
11
|
+
swizzle: {
|
12
|
+
items: [
|
13
|
+
{
|
14
|
+
group: "Buttons",
|
15
|
+
label: "ShowButton",
|
16
|
+
files: [
|
17
|
+
{
|
18
|
+
src: "./src/components/buttons/show/index.tsx",
|
19
|
+
dest: "./components/buttons/show.tsx",
|
20
|
+
},
|
21
|
+
],
|
22
|
+
},
|
23
|
+
{
|
24
|
+
group: "Buttons",
|
25
|
+
label: "CreateButton",
|
26
|
+
message: `
|
27
27
|
**\`Warning:\`**
|
28
28
|
This component is used in the below component. If you want to change it, you can run the **swizzle** command for the below component or you can use props to override the default buttons.
|
29
29
|
- <List/>
|
30
30
|
`,
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
31
|
+
files: [
|
32
|
+
{
|
33
|
+
src: "./src/components/buttons/create/index.tsx",
|
34
|
+
dest: "./components/buttons/create.tsx",
|
35
|
+
},
|
36
|
+
],
|
37
|
+
},
|
38
|
+
{
|
39
|
+
group: "Buttons",
|
40
|
+
label: "CloneButton",
|
41
|
+
files: [
|
42
|
+
{
|
43
|
+
src: "./src/components/buttons/clone/index.tsx",
|
44
|
+
dest: "./components/buttons/clone.tsx",
|
45
|
+
},
|
46
|
+
],
|
47
|
+
},
|
48
|
+
{
|
49
|
+
group: "Buttons",
|
50
|
+
label: "DeleteButton",
|
51
|
+
message: `
|
52
52
|
**\`Warning:\`**
|
53
53
|
This component is used in the below components. If you want to change it, you can run the **swizzle** command for the below components or you can use props to override the default buttons.
|
54
54
|
- <Edit/>
|
55
55
|
- <List/>
|
56
56
|
`,
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
57
|
+
files: [
|
58
|
+
{
|
59
|
+
src: "./src/components/buttons/delete/index.tsx",
|
60
|
+
dest: "./components/buttons/delete.tsx",
|
61
|
+
},
|
62
|
+
],
|
63
|
+
},
|
64
|
+
{
|
65
|
+
group: "Buttons",
|
66
|
+
label: "EditButton",
|
67
|
+
message: `
|
68
68
|
**\`Warning:\`**
|
69
69
|
This component is used in the below component. If you want to change it, you can run the **swizzle** command for the below component or you can use props to override the default buttons.
|
70
70
|
- <Show/>
|
71
71
|
`,
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
72
|
+
files: [
|
73
|
+
{
|
74
|
+
src: "./src/components/buttons/edit/index.tsx",
|
75
|
+
dest: "./components/buttons/edit.tsx",
|
76
|
+
},
|
77
|
+
],
|
78
|
+
},
|
79
|
+
{
|
80
|
+
group: "Buttons",
|
81
|
+
label: "ExportButton",
|
82
|
+
files: [
|
83
|
+
{
|
84
|
+
src: "./src/components/buttons/export/index.tsx",
|
85
|
+
dest: "./components/buttons/export.tsx",
|
86
|
+
},
|
87
|
+
],
|
88
|
+
},
|
89
|
+
{
|
90
|
+
group: "Buttons",
|
91
|
+
label: "ImportButton",
|
92
|
+
files: [
|
93
|
+
{
|
94
|
+
src: "./src/components/buttons/import/index.tsx",
|
95
|
+
dest: "./components/buttons/import.tsx",
|
96
|
+
},
|
97
|
+
],
|
98
|
+
},
|
99
|
+
{
|
100
|
+
group: "Buttons",
|
101
|
+
label: "ListButton",
|
102
|
+
message: `
|
103
103
|
**\`Warning:\`**
|
104
104
|
This component is used in the below components. If you want to change it, you can run the **swizzle** command for the below components or you can use props to override the default buttons.
|
105
105
|
- <Edit/>
|
106
106
|
- <Show/>
|
107
107
|
`,
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
108
|
+
files: [
|
109
|
+
{
|
110
|
+
src: "./src/components/buttons/list/index.tsx",
|
111
|
+
dest: "./components/buttons/list.tsx",
|
112
|
+
},
|
113
|
+
],
|
114
|
+
},
|
115
|
+
{
|
116
|
+
group: "Buttons",
|
117
|
+
label: "RefreshButton",
|
118
|
+
message: `
|
119
119
|
**\`Warning:\`**
|
120
120
|
This component is used in the below components. If you want to change it, you can run the **swizzle** command for the below components or you can use props to override the default buttons.
|
121
121
|
- <Edit/>
|
122
122
|
- <Show/>
|
123
123
|
`,
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
124
|
+
files: [
|
125
|
+
{
|
126
|
+
src: "./src/components/buttons/refresh/index.tsx",
|
127
|
+
dest: "./components/buttons/refresh.tsx",
|
128
|
+
},
|
129
|
+
],
|
130
|
+
},
|
131
|
+
{
|
132
|
+
group: "Buttons",
|
133
|
+
label: "SaveButton",
|
134
|
+
message: `
|
135
135
|
**\`Warning:\`**
|
136
136
|
This component is used in the below components. If you want to change it, you can run the **swizzle** command for the below components or you can use props to override the default buttons.
|
137
137
|
- <Create/>
|
138
138
|
- <Edit/>
|
139
139
|
`,
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
140
|
+
files: [
|
141
|
+
{
|
142
|
+
src: "./src/components/buttons/save/index.tsx",
|
143
|
+
dest: "./components/buttons/save.tsx",
|
144
|
+
},
|
145
|
+
],
|
146
|
+
},
|
147
|
+
{
|
148
|
+
group: "Basic Views",
|
149
|
+
label: "Create",
|
150
|
+
files: [
|
151
|
+
{
|
152
|
+
src: "./src/components/crud/create/index.tsx",
|
153
|
+
dest: "./components/crud/create.tsx",
|
154
|
+
},
|
155
|
+
],
|
156
|
+
},
|
157
|
+
{
|
158
|
+
group: "Basic Views",
|
159
|
+
label: "List",
|
160
|
+
files: [
|
161
|
+
{
|
162
|
+
src: "./src/components/crud/list/index.tsx",
|
163
|
+
dest: "./components/crud/list.tsx",
|
164
|
+
},
|
165
|
+
],
|
166
|
+
},
|
167
|
+
{
|
168
|
+
group: "Basic Views",
|
169
|
+
label: "Show",
|
170
|
+
files: [
|
171
|
+
{
|
172
|
+
src: "./src/components/crud/show/index.tsx",
|
173
|
+
dest: "./components/crud/show.tsx",
|
174
|
+
},
|
175
|
+
],
|
176
|
+
},
|
177
|
+
{
|
178
|
+
group: "Basic Views",
|
179
|
+
label: "Edit",
|
180
|
+
files: [
|
181
|
+
{
|
182
|
+
src: "./src/components/crud/edit/index.tsx",
|
183
|
+
dest: "./components/crud/edit.tsx",
|
184
|
+
},
|
185
|
+
],
|
186
|
+
},
|
187
|
+
{
|
188
|
+
group: "Fields",
|
189
|
+
label: "BooleanField",
|
190
|
+
files: [
|
191
|
+
{
|
192
|
+
src: "./src/components/fields/boolean/index.tsx",
|
193
|
+
dest: "./components/fields/boolean.tsx",
|
194
|
+
},
|
195
|
+
],
|
196
|
+
},
|
197
|
+
{
|
198
|
+
group: "Fields",
|
199
|
+
label: "DateField",
|
200
|
+
files: [
|
201
|
+
{
|
202
|
+
src: "./src/components/fields/date/index.tsx",
|
203
|
+
dest: "./components/fields/date.tsx",
|
204
|
+
},
|
205
|
+
],
|
206
|
+
},
|
207
|
+
{
|
208
|
+
group: "Fields",
|
209
|
+
label: "EmailField",
|
210
|
+
files: [
|
211
|
+
{
|
212
|
+
src: "./src/components/fields/email/index.tsx",
|
213
|
+
dest: "./components/fields/email.tsx",
|
214
|
+
},
|
215
|
+
],
|
216
|
+
},
|
217
|
+
{
|
218
|
+
group: "Fields",
|
219
|
+
label: "FileField",
|
220
|
+
files: [
|
221
|
+
{
|
222
|
+
src: "./src/components/fields/file/index.tsx",
|
223
|
+
dest: "./components/fields/file.tsx",
|
224
|
+
},
|
225
|
+
],
|
226
|
+
},
|
227
|
+
{
|
228
|
+
group: "Fields",
|
229
|
+
label: "ImageField",
|
230
|
+
files: [
|
231
|
+
{
|
232
|
+
src: "./src/components/fields/image/index.tsx",
|
233
|
+
dest: "./components/fields/image.tsx",
|
234
|
+
},
|
235
|
+
],
|
236
|
+
},
|
237
|
+
{
|
238
|
+
group: "Fields",
|
239
|
+
label: "MarkdownField",
|
240
|
+
files: [
|
241
|
+
{
|
242
|
+
src: "./src/components/fields/markdown/index.tsx",
|
243
|
+
dest: "./components/fields/markdown.tsx",
|
244
|
+
},
|
245
|
+
],
|
246
|
+
},
|
247
|
+
{
|
248
|
+
group: "Fields",
|
249
|
+
label: "NumberField",
|
250
|
+
files: [
|
251
|
+
{
|
252
|
+
src: "./src/components/fields/number/index.tsx",
|
253
|
+
dest: "./components/fields/number.tsx",
|
254
|
+
},
|
255
|
+
],
|
256
|
+
},
|
257
|
+
{
|
258
|
+
group: "Fields",
|
259
|
+
label: "TagField",
|
260
|
+
files: [
|
261
|
+
{
|
262
|
+
src: "./src/components/fields/tag/index.tsx",
|
263
|
+
dest: "./components/fields/tag.tsx",
|
264
|
+
},
|
265
|
+
],
|
266
|
+
},
|
267
|
+
{
|
268
|
+
group: "Fields",
|
269
|
+
label: "TextField",
|
270
|
+
files: [
|
271
|
+
{
|
272
|
+
src: "./src/components/fields/text/index.tsx",
|
273
|
+
dest: "./components/fields/text.tsx",
|
274
|
+
},
|
275
|
+
],
|
276
|
+
},
|
277
|
+
{
|
278
|
+
group: "Fields",
|
279
|
+
label: "UrlField",
|
280
|
+
files: [
|
281
|
+
{
|
282
|
+
src: "./src/components/fields/url/index.tsx",
|
283
|
+
dest: "./components/fields/url.tsx",
|
284
|
+
},
|
285
|
+
],
|
286
|
+
},
|
287
|
+
{
|
288
|
+
group: "Pages",
|
289
|
+
label: "ErrorPage",
|
290
|
+
message: `
|
291
291
|
**\`Info:\`**
|
292
292
|
If you want to see an example of error page in use, you can refer to the documentation at https://refine.dev/docs/packages/documentation/routers
|
293
293
|
`,
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
},
|
312
|
-
},
|
313
|
-
],
|
294
|
+
files: [
|
295
|
+
{
|
296
|
+
src: "./src/components/pages/error/index.tsx",
|
297
|
+
dest: "./components/pages/error.tsx",
|
298
|
+
transform: (content) => {
|
299
|
+
let newContent = content;
|
300
|
+
|
301
|
+
// for remove RefineErorrPageProps
|
302
|
+
const refineErrorPagePropsRegex =
|
303
|
+
/React\.FC<RefineErrorPageProps>/g;
|
304
|
+
|
305
|
+
newContent = newContent.replace(
|
306
|
+
refineErrorPagePropsRegex,
|
307
|
+
"React.FC",
|
308
|
+
);
|
309
|
+
|
310
|
+
return newContent;
|
314
311
|
},
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
312
|
+
},
|
313
|
+
],
|
314
|
+
},
|
315
|
+
{
|
316
|
+
group: "Pages",
|
317
|
+
label: "AuthPage",
|
318
|
+
message: `
|
319
319
|
**\`Info:\`**
|
320
320
|
If you want to see examples of authentication pages in use, you can refer to the documentation at https://refine.dev/docs/packages/documentation/routers
|
321
321
|
`,
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
transform: (content) => {
|
382
|
-
let newContent = content;
|
383
|
-
|
384
|
-
// for change style import path
|
385
|
-
const styleImportRegex = /"\.\.\/styles";/g;
|
386
|
-
|
387
|
-
newContent = newContent.replace(
|
388
|
-
styleImportRegex,
|
389
|
-
`"./styles";`,
|
390
|
-
);
|
391
|
-
|
392
|
-
return newContent;
|
393
|
-
},
|
394
|
-
},
|
395
|
-
{
|
396
|
-
src: "./src/components/pages/auth/components/index.tsx",
|
397
|
-
dest: "./components/pages/auth/components/index.tsx",
|
398
|
-
},
|
399
|
-
{
|
400
|
-
src: "./src/components/pages/auth/components/styles.ts",
|
401
|
-
dest: "./components/pages/auth/components/styles.ts",
|
402
|
-
},
|
403
|
-
],
|
322
|
+
files: [
|
323
|
+
{
|
324
|
+
src: "./src/components/pages/auth/index.tsx",
|
325
|
+
dest: "./components/pages/auth/index.tsx",
|
326
|
+
},
|
327
|
+
{
|
328
|
+
src: "./src/components/pages/auth/components/forgotPassword/index.tsx",
|
329
|
+
dest: "./components/pages/auth/components/forgotPassword.tsx",
|
330
|
+
transform: (content) => {
|
331
|
+
let newContent = content;
|
332
|
+
|
333
|
+
// for change style import path
|
334
|
+
const styleImportRegex = /"\.\.\/styles";/g;
|
335
|
+
|
336
|
+
newContent = newContent.replace(styleImportRegex, `"./styles";`);
|
337
|
+
|
338
|
+
return newContent;
|
339
|
+
},
|
340
|
+
},
|
341
|
+
{
|
342
|
+
src: "./src/components/pages/auth/components/login/index.tsx",
|
343
|
+
dest: "./components/pages/auth/components/login.tsx",
|
344
|
+
transform: (content) => {
|
345
|
+
let newContent = content;
|
346
|
+
|
347
|
+
// for change style import path
|
348
|
+
const styleImportRegex = /"\.\.\/styles";/g;
|
349
|
+
|
350
|
+
newContent = newContent.replace(styleImportRegex, `"./styles";`);
|
351
|
+
|
352
|
+
return newContent;
|
353
|
+
},
|
354
|
+
},
|
355
|
+
{
|
356
|
+
src: "./src/components/pages/auth/components/register/index.tsx",
|
357
|
+
dest: "./components/pages/auth/components/register.tsx",
|
358
|
+
transform: (content) => {
|
359
|
+
let newContent = content;
|
360
|
+
|
361
|
+
// for change style import path
|
362
|
+
const styleImportRegex = /"\.\.\/styles";/g;
|
363
|
+
|
364
|
+
newContent = newContent.replace(styleImportRegex, `"./styles";`);
|
365
|
+
|
366
|
+
return newContent;
|
367
|
+
},
|
368
|
+
},
|
369
|
+
{
|
370
|
+
src: "./src/components/pages/auth/components/updatePassword/index.tsx",
|
371
|
+
dest: "./components/pages/auth/components/updatePassword.tsx",
|
372
|
+
transform: (content) => {
|
373
|
+
let newContent = content;
|
374
|
+
|
375
|
+
// for change style import path
|
376
|
+
const styleImportRegex = /"\.\.\/styles";/g;
|
377
|
+
|
378
|
+
newContent = newContent.replace(styleImportRegex, `"./styles";`);
|
379
|
+
|
380
|
+
return newContent;
|
404
381
|
},
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
382
|
+
},
|
383
|
+
{
|
384
|
+
src: "./src/components/pages/auth/components/index.tsx",
|
385
|
+
dest: "./components/pages/auth/components/index.tsx",
|
386
|
+
},
|
387
|
+
{
|
388
|
+
src: "./src/components/pages/auth/components/styles.ts",
|
389
|
+
dest: "./components/pages/auth/components/styles.ts",
|
390
|
+
},
|
391
|
+
],
|
392
|
+
},
|
393
|
+
{
|
394
|
+
group: "Other",
|
395
|
+
label: "Breadcrumb",
|
396
|
+
message: `
|
409
397
|
**\`Warning:\`**
|
410
398
|
This component is used in the below components. If you want to change it, you can use props to override the default breadcrumb or you can manage globally with the **options** prop to the **<Refine/>** component.
|
411
399
|
- <Edit/>
|
@@ -432,40 +420,37 @@ module.exports = {
|
|
432
420
|
}
|
433
421
|
\`\`\`
|
434
422
|
`,
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
);
|
459
|
-
|
460
|
-
return newContent;
|
461
|
-
},
|
462
|
-
},
|
463
|
-
],
|
423
|
+
files: [
|
424
|
+
{
|
425
|
+
src: "./src/components/breadcrumb/index.tsx",
|
426
|
+
dest: "./components/breadcrumb.tsx",
|
427
|
+
transform: (content) => {
|
428
|
+
let newContent = content;
|
429
|
+
|
430
|
+
// for remove type export
|
431
|
+
const breadcrumbPropsExportRegex =
|
432
|
+
/export type BreadcrumbProps = RefineBreadcrumbProps<AntdBreadcrumbProps>;?/g;
|
433
|
+
|
434
|
+
newContent = newContent.replace(
|
435
|
+
breadcrumbPropsExportRegex,
|
436
|
+
`import { BreadcrumbProps } from "@refinedev/antd";`,
|
437
|
+
);
|
438
|
+
|
439
|
+
// change the breadcrumb import path
|
440
|
+
const breadcrumbImportRegex =
|
441
|
+
/BreadcrumbProps as AntdBreadcrumbProps,/g;
|
442
|
+
|
443
|
+
newContent = newContent.replace(breadcrumbImportRegex, "");
|
444
|
+
|
445
|
+
return newContent;
|
464
446
|
},
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
447
|
+
},
|
448
|
+
],
|
449
|
+
},
|
450
|
+
{
|
451
|
+
group: "Other",
|
452
|
+
label: "ThemedLayoutV2",
|
453
|
+
message: `
|
469
454
|
**\`Warning:\`**
|
470
455
|
If you want to change the default layout;
|
471
456
|
You should pass layout related components to the **<ThemedLayoutV2 />** component's props.
|
@@ -490,140 +475,128 @@ module.exports = {
|
|
490
475
|
}
|
491
476
|
\`\`\`
|
492
477
|
`,
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
newContent = newContent.replace(
|
510
|
-
importItem.statement,
|
511
|
-
newStatement,
|
512
|
-
);
|
513
|
-
}
|
514
|
-
|
515
|
-
// add content of ./styles.ts and remove import
|
516
|
-
if (importItem.importPath === "./styles") {
|
517
|
-
newContent = newContent.replace(
|
518
|
-
importItem.statement,
|
519
|
-
"",
|
520
|
-
);
|
521
|
-
|
522
|
-
let appending = "";
|
523
|
-
|
524
|
-
try {
|
525
|
-
const stylesContent = getFileContent(
|
526
|
-
join(
|
527
|
-
dirname(
|
528
|
-
"./src/components/themedLayoutV2/sider/index.tsx",
|
529
|
-
),
|
530
|
-
"/styles.ts",
|
531
|
-
),
|
532
|
-
"utf-8",
|
533
|
-
).replace("export const", "const");
|
534
|
-
|
535
|
-
appending = stylesContent;
|
536
|
-
} catch (err) {
|
537
|
-
// console.log(err);
|
538
|
-
}
|
539
|
-
|
540
|
-
newContent = appendAfterImports(
|
541
|
-
newContent,
|
542
|
-
appending,
|
543
|
-
);
|
544
|
-
}
|
545
|
-
});
|
546
|
-
|
547
|
-
return newContent;
|
548
|
-
},
|
549
|
-
},
|
550
|
-
{
|
551
|
-
src: "./src/components/themedLayoutV2/header/index.tsx",
|
552
|
-
dest: "./components/layout/header.tsx",
|
553
|
-
},
|
554
|
-
{
|
555
|
-
src: "./src/components/themedLayoutV2/title/index.tsx",
|
556
|
-
dest: "./components/layout/title.tsx",
|
557
|
-
},
|
558
|
-
{
|
559
|
-
src: "./src/components/themedLayoutV2/index.tsx",
|
560
|
-
dest: "./components/layout/index.tsx",
|
561
|
-
transform: (content) => {
|
562
|
-
let newContent = content;
|
563
|
-
const imports = getImports(content);
|
564
|
-
|
565
|
-
imports.map((importItem) => {
|
566
|
-
// handle @components import replacement
|
567
|
-
if (
|
568
|
-
importItem.importPath === "@components" ||
|
569
|
-
importItem.importPath === "@contexts" ||
|
570
|
-
importItem.importPath === "@hooks"
|
571
|
-
) {
|
572
|
-
const newStatement = `import ${importItem.namedImports} from "@refinedev/antd";`;
|
573
|
-
|
574
|
-
newContent = newContent.replace(
|
575
|
-
importItem.statement,
|
576
|
-
newStatement,
|
577
|
-
);
|
578
|
-
}
|
579
|
-
});
|
580
|
-
|
581
|
-
return newContent;
|
582
|
-
},
|
583
|
-
},
|
584
|
-
],
|
585
|
-
},
|
586
|
-
],
|
587
|
-
transform: (content) => {
|
588
|
-
let newContent = content;
|
589
|
-
const imports = getImports(content);
|
590
|
-
|
591
|
-
imports.map((importItem) => {
|
592
|
-
if (importItem.importPath === "@components") {
|
593
|
-
const newStatement = `import ${importItem.namedImports} from "@refinedev/antd";`;
|
478
|
+
files: [
|
479
|
+
{
|
480
|
+
src: "./src/components/themedLayoutV2/sider/index.tsx",
|
481
|
+
dest: "./components/layout/sider.tsx",
|
482
|
+
transform: (content) => {
|
483
|
+
let newContent = content;
|
484
|
+
const imports = getImports(content);
|
485
|
+
|
486
|
+
imports.map((importItem) => {
|
487
|
+
// handle @components import replacement
|
488
|
+
if (
|
489
|
+
importItem.importPath === "@components" ||
|
490
|
+
importItem.importPath === "@hooks"
|
491
|
+
) {
|
492
|
+
const newStatement = `import ${importItem.namedImports} from "@refinedev/antd";`;
|
594
493
|
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
494
|
+
newContent = newContent.replace(
|
495
|
+
importItem.statement,
|
496
|
+
newStatement,
|
497
|
+
);
|
599
498
|
}
|
600
499
|
|
601
|
-
//
|
602
|
-
if (importItem.importPath === "
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
500
|
+
// add content of ./styles.ts and remove import
|
501
|
+
if (importItem.importPath === "./styles") {
|
502
|
+
newContent = newContent.replace(importItem.statement, "");
|
503
|
+
|
504
|
+
let appending = "";
|
505
|
+
|
506
|
+
try {
|
507
|
+
const stylesContent = getFileContent(
|
508
|
+
join(
|
509
|
+
dirname(
|
510
|
+
"./src/components/themedLayoutV2/sider/index.tsx",
|
511
|
+
),
|
512
|
+
"/styles.ts",
|
513
|
+
),
|
514
|
+
"utf-8",
|
515
|
+
).replace("export const", "const");
|
516
|
+
|
517
|
+
appending = stylesContent;
|
518
|
+
} catch (err) {
|
519
|
+
// console.log(err);
|
520
|
+
}
|
521
|
+
|
522
|
+
newContent = appendAfterImports(newContent, appending);
|
610
523
|
}
|
524
|
+
});
|
611
525
|
|
612
|
-
|
526
|
+
return newContent;
|
527
|
+
},
|
528
|
+
},
|
529
|
+
{
|
530
|
+
src: "./src/components/themedLayoutV2/header/index.tsx",
|
531
|
+
dest: "./components/layout/header.tsx",
|
532
|
+
},
|
533
|
+
{
|
534
|
+
src: "./src/components/themedLayoutV2/title/index.tsx",
|
535
|
+
dest: "./components/layout/title.tsx",
|
536
|
+
},
|
537
|
+
{
|
538
|
+
src: "./src/components/themedLayoutV2/index.tsx",
|
539
|
+
dest: "./components/layout/index.tsx",
|
540
|
+
transform: (content) => {
|
541
|
+
let newContent = content;
|
542
|
+
const imports = getImports(content);
|
543
|
+
|
544
|
+
imports.map((importItem) => {
|
545
|
+
// handle @components import replacement
|
613
546
|
if (
|
614
|
-
|
615
|
-
|
547
|
+
importItem.importPath === "@components" ||
|
548
|
+
importItem.importPath === "@contexts" ||
|
549
|
+
importItem.importPath === "@hooks"
|
616
550
|
) {
|
617
|
-
|
551
|
+
const newStatement = `import ${importItem.namedImports} from "@refinedev/antd";`;
|
618
552
|
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
553
|
+
newContent = newContent.replace(
|
554
|
+
importItem.statement,
|
555
|
+
newStatement,
|
556
|
+
);
|
623
557
|
}
|
624
|
-
|
558
|
+
});
|
625
559
|
|
626
|
-
|
627
|
-
|
560
|
+
return newContent;
|
561
|
+
},
|
562
|
+
},
|
563
|
+
],
|
564
|
+
},
|
565
|
+
],
|
566
|
+
transform: (content) => {
|
567
|
+
let newContent = content;
|
568
|
+
const imports = getImports(content);
|
569
|
+
|
570
|
+
imports.map((importItem) => {
|
571
|
+
if (importItem.importPath === "@components") {
|
572
|
+
const newStatement = `import ${importItem.namedImports} from "@refinedev/antd";`;
|
573
|
+
|
574
|
+
newContent = newContent.replace(importItem.statement, newStatement);
|
575
|
+
}
|
576
|
+
|
577
|
+
// for ui-types
|
578
|
+
if (importItem.importPath === "@refinedev/ui-types") {
|
579
|
+
newContent = newContent.replace(importItem.statement, "");
|
580
|
+
|
581
|
+
// prop is data-testid
|
582
|
+
// remove data-testid={*} from props
|
583
|
+
const testIdPropRegex = /data-testid={.*?}/g;
|
584
|
+
|
585
|
+
newContent = newContent.replace(testIdPropRegex, "");
|
586
|
+
}
|
587
|
+
|
588
|
+
// for prop types
|
589
|
+
if (
|
590
|
+
importItem.importPath === "../types" ||
|
591
|
+
importItem.importPath === "./types"
|
592
|
+
) {
|
593
|
+
const newStatement = `import type ${importItem.namedImports} from "@refinedev/antd";`;
|
594
|
+
|
595
|
+
newContent = newContent.replace(importItem.statement, newStatement);
|
596
|
+
}
|
597
|
+
});
|
598
|
+
|
599
|
+
return newContent;
|
628
600
|
},
|
601
|
+
},
|
629
602
|
};
|