From 42ec71aaa31c34f60ed71da18e394966fcf73b23 Mon Sep 17 00:00:00 2001 From: manish3323 Date: Wed, 16 Aug 2023 12:57:12 +0530 Subject: [PATCH 01/11] update antd version to v5 from v4 --- packages/antd/package.json | 4 +- .../antd/src/components/DatePicker/index.ts | 6 - .../antd/src/templates/IconButton/index.tsx | 14 +- .../antd/src/widgets/AltDateWidget/index.tsx | 4 +- .../antd/src/widgets/DateTimeWidget/index.tsx | 2 +- .../antd/src/widgets/DateWidget/index.tsx | 2 +- .../test/__snapshots__/Array.test.tsx.snap | 3762 +++++++++-------- .../test/__snapshots__/Form.test.tsx.snap | 1253 +++--- .../test/__snapshots__/Object.test.tsx.snap | 2297 +++++----- 9 files changed, 3997 insertions(+), 3347 deletions(-) delete mode 100644 packages/antd/src/components/DatePicker/index.ts diff --git a/packages/antd/package.json b/packages/antd/package.json index 21ed89838d..5f24f6057d 100644 --- a/packages/antd/package.json +++ b/packages/antd/package.json @@ -37,7 +37,7 @@ "@ant-design/icons": "^4.0.0", "@rjsf/core": "^5.8.x", "@rjsf/utils": "^5.8.x", - "antd": "^4.0.0", + "antd": "^5.0.0", "dayjs": "^1.8.0", "react": "^16.14.0 || >=17" }, @@ -65,7 +65,7 @@ "@types/react": "^17.0.62", "@types/react-dom": "^17.0.20", "@types/react-test-renderer": "^17.0.2", - "antd": "^4.24.13", + "antd": "^5.0.0", "atob": "^2.1.2", "babel-jest": "^29.6.2", "dayjs": "^1.11.9", diff --git a/packages/antd/src/components/DatePicker/index.ts b/packages/antd/src/components/DatePicker/index.ts deleted file mode 100644 index 6a85c019a9..0000000000 --- a/packages/antd/src/components/DatePicker/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -import dayjsGenerateConfig from 'rc-picker/lib/generate/dayjs'; -import generatePicker from 'antd/lib/date-picker/generatePicker'; - -const DatePicker = generatePicker(dayjsGenerateConfig); - -export default DatePicker; diff --git a/packages/antd/src/templates/IconButton/index.tsx b/packages/antd/src/templates/IconButton/index.tsx index ccdfe85059..026e4be951 100644 --- a/packages/antd/src/templates/IconButton/index.tsx +++ b/packages/antd/src/templates/IconButton/index.tsx @@ -12,6 +12,7 @@ import { StrictRJSFSchema, TranslatableString, } from '@rjsf/utils'; +import { MouseEventHandler } from 'react'; // The `type` for IconButtonProps collides with the `type` for `ButtonProps` so omit it to avoid Typescript issue export type AntdIconButtonProps< @@ -21,10 +22,17 @@ export type AntdIconButtonProps< > = Omit, 'type'>; export default function IconButton( - props: AntdIconButtonProps & ButtonProps + props: AntdIconButtonProps & Omit ) { - const { iconType = 'default', icon, uiSchema, registry, ...otherProps } = props; - return @@ -119,9 +125,10 @@ exports[`array fields array 1`] = `
@@ -478,7 +505,7 @@ exports[`array fields array icons 1`] = `
@@ -628,7 +675,7 @@ exports[`array fields array icons 1`] = `
@@ -697,9 +750,10 @@ exports[`array fields array icons 1`] = `
@@ -1819,9 +1909,10 @@ exports[`with title and description array 1`] = `
@@ -2253,7 +2364,7 @@ exports[`with title and description array icons 1`] = `
@@ -2403,7 +2534,7 @@ exports[`with title and description array icons 1`] = `
@@ -2481,9 +2618,10 @@ exports[`with title and description array icons 1`] = `
@@ -3197,9 +3367,10 @@ exports[`with title and description from both array 1`] = `
@@ -3631,7 +3822,7 @@ exports[`with title and description from both array icons 1`] = `
@@ -3781,7 +3992,7 @@ exports[`with title and description from both array icons 1`] = `
@@ -3859,9 +4076,10 @@ exports[`with title and description from both array icons 1`] = `
@@ -4575,9 +4825,10 @@ exports[`with title and description from uiSchema array 1`] = `
@@ -5009,7 +5280,7 @@ exports[`with title and description from uiSchema array icons 1`] = `
@@ -5159,7 +5450,7 @@ exports[`with title and description from uiSchema array icons 1`] = `
@@ -5237,9 +5534,10 @@ exports[`with title and description from uiSchema array icons 1`] = `
@@ -5938,9 +6268,10 @@ exports[`with title and description with global label off array 1`] = `
@@ -6333,7 +6684,7 @@ exports[`with title and description with global label off array icons 1`] = `
@@ -6483,7 +6854,7 @@ exports[`with title and description with global label off array icons 1`] = `
@@ -6561,9 +6938,10 @@ exports[`with title and description with global label off array icons 1`] = `