@refinedev/antd 5.3.13 → 5.4.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 +17 -0
- package/dist/components/layout/index.d.ts +4 -0
- package/dist/components/layout/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/hooks/form/useDrawerForm/useDrawerForm.d.ts.map +1 -1
- package/dist/hooks/form/useModalForm/useModalForm.d.ts.map +1 -1
- package/dist/iife/index.js +6 -6
- package/dist/iife/index.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/layout/index.tsx +4 -0
- package/src/hooks/form/useDrawerForm/useDrawerForm.ts +11 -5
- package/src/hooks/form/useModalForm/useModalForm.ts +11 -5
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@refinedev/antd",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.4.0",
|
4
4
|
"description": "refine is a React-based framework for building internal tools, rapidly. It ships with Ant Design System, an enterprise-level UI toolkit.",
|
5
5
|
"private": false,
|
6
6
|
"main": "dist/index.js",
|
@@ -25,7 +25,7 @@
|
|
25
25
|
"devDependencies": {
|
26
26
|
"@refinedev/cli": "^2.1.0",
|
27
27
|
"@refinedev/ui-tests": "^1.3.2",
|
28
|
-
"@refinedev/core": "^4.5.
|
28
|
+
"@refinedev/core": "^4.5.10",
|
29
29
|
"@esbuild-plugins/node-resolve": "^0.1.4",
|
30
30
|
"@testing-library/jest-dom": "^5.16.4",
|
31
31
|
"@testing-library/react": "^13.1.1",
|
@@ -5,6 +5,10 @@ import { Sider as DefaultSider } from "./sider";
|
|
5
5
|
import { Header as DefaultHeader } from "./header";
|
6
6
|
import { RefineLayoutLayoutProps } from "./types";
|
7
7
|
|
8
|
+
/**
|
9
|
+
* @deprecated use `<ThemedLayout>` instead with 100% backward compatibility.
|
10
|
+
* @see https://refine.dev/docs/api-reference/antd/components/antd-themed-layout
|
11
|
+
**/
|
8
12
|
export const Layout: React.FC<RefineLayoutLayoutProps> = ({
|
9
13
|
children,
|
10
14
|
Header,
|
@@ -207,11 +207,17 @@ export const useDrawerForm = <
|
|
207
207
|
setId?.(undefined);
|
208
208
|
}, [warnWhen]);
|
209
209
|
|
210
|
-
const handleShow = useCallback(
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
210
|
+
const handleShow = useCallback(
|
211
|
+
(showId?: BaseKey) => {
|
212
|
+
if (typeof showId !== "undefined") {
|
213
|
+
setId?.(showId);
|
214
|
+
}
|
215
|
+
if (typeof showId !== "undefined" || typeof id !== "undefined") {
|
216
|
+
show();
|
217
|
+
}
|
218
|
+
},
|
219
|
+
[id],
|
220
|
+
);
|
215
221
|
|
216
222
|
return {
|
217
223
|
...useFormProps,
|
@@ -202,11 +202,17 @@ export const useModalForm = <
|
|
202
202
|
sunflowerUseModal.close();
|
203
203
|
}, [warnWhen]);
|
204
204
|
|
205
|
-
const handleShow = useCallback(
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
205
|
+
const handleShow = useCallback(
|
206
|
+
(showId?: BaseKey) => {
|
207
|
+
if (typeof showId !== "undefined") {
|
208
|
+
setId?.(showId);
|
209
|
+
}
|
210
|
+
if (typeof showId !== "undefined" || typeof id !== "undefined") {
|
211
|
+
sunflowerUseModal.show();
|
212
|
+
}
|
213
|
+
},
|
214
|
+
[id],
|
215
|
+
);
|
210
216
|
|
211
217
|
const { visible: _visible, ...otherModalProps } = modalProps;
|
212
218
|
const newModalProps = { open: _visible, ...otherModalProps };
|