Skip to content

Commit 304d24d

Browse files
committed
♻️ cleanup: format code and remove unused imports
1 parent ac1425f commit 304d24d

File tree

23 files changed

+105
-146
lines changed

23 files changed

+105
-146
lines changed

docs/changelog.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## @ant-design/pro-components@2.8.4
2+
3+
`2025-01-18`
4+
5+
- cleanup: replace omit.js & remove some duplicate util (#8965) (2 天前) <𝑾𝒖𝒙𝒉>
6+
- fix: remove Table deadCode (#8966) (2 天前) <chenliandong>
7+
- chore: try fix test (#8974) (4 天前) <𝑾𝒖𝒙𝒉>
8+
- fix: FooterToolbar supports SSR (#8969) (4 天前) <谭真>
9+
110
## @ant-design/pro-components@2.8.3
211

312
`2025-01-06`

packages/card/CHANGELOG.md

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
# Change Log
22

3-
All notable changes to this project will be documented in this file.
4-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
3+
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
54

65
## [2.9.4](https://github.com/ant-design/pro-components/compare/@ant-design/[email protected]...@ant-design/[email protected]) (2025-01-18)
76

87
**Note:** Version bump only for package @ant-design/pro-card
98

10-
11-
12-
13-
149
## [2.9.3](https://github.com/ant-design/pro-components/compare/@ant-design/[email protected]...@ant-design/[email protected]) (2025-01-06)
1510

1611
### Bug Fixes

packages/card/src/components/Card/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { ConfigProvider, Tabs } from 'antd';
44

55
import useBreakpoint from 'antd/es/grid/hooks/useBreakpoint';
66
import classNames from 'classnames';
7-
import omit from 'rc-util/lib/omit';
87
import useMergedState from 'rc-util/lib/hooks/useMergedState';
8+
import omit from 'rc-util/lib/omit';
99
import React, { useContext } from 'react';
1010
import type { Breakpoint, CardProps, Gutter } from '../../typing';
1111
import Actions from '../Actions';

packages/components/CHANGELOG.md

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
# Change Log
22

3-
All notable changes to this project will be documented in this file.
4-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
3+
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
54

65
## [2.8.4](https://github.com/ant-design/pro-components/compare/@ant-design/[email protected]...@ant-design/[email protected]) (2025-01-18)
76

87
**Note:** Version bump only for package @ant-design/pro-components
98

10-
11-
12-
13-
149
## [2.8.3](https://github.com/ant-design/pro-components/compare/@ant-design/[email protected]...@ant-design/[email protected]) (2025-01-06)
1510

1611
### Bug Fixes

packages/descriptions/CHANGELOG.md

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
# Change Log
22

3-
All notable changes to this project will be documented in this file.
4-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
3+
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
54

65
## [2.6.4](https://github.com/ant-design/pro-components/compare/@ant-design/[email protected]...@ant-design/[email protected]) (2025-01-18)
76

87
**Note:** Version bump only for package @ant-design/pro-descriptions
98

10-
11-
12-
13-
149
## [2.6.3](https://github.com/ant-design/pro-components/compare/@ant-design/[email protected]...@ant-design/[email protected]) (2025-01-06)
1510

1611
### Bug Fixes

packages/field/CHANGELOG.md

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
# Change Log
22

3-
All notable changes to this project will be documented in this file.
4-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
3+
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
54

65
## [3.0.1](https://github.com/ant-design/pro-components/compare/@ant-design/[email protected]...@ant-design/[email protected]) (2025-01-18)
76

87
**Note:** Version bump only for package @ant-design/pro-field
98

10-
11-
12-
13-
149
# [3.0.0](https://github.com/ant-design/pro-components/compare/@ant-design/[email protected]...@ant-design/[email protected]) (2025-01-06)
1510

1611
### Bug Fixes

packages/field/src/components/Money/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { intlMap as allIntlMap, useIntl } from '@ant-design/pro-provider';
22
import type { InputNumberProps } from 'antd';
33
import { InputNumber, Popover } from 'antd';
4-
import omit from 'rc-util/lib/omit';
54
import useMergedState from 'rc-util/lib/hooks/useMergedState';
5+
import omit from 'rc-util/lib/omit';
66
import React, { useCallback, useMemo } from 'react';
77
import type { ProFieldFC } from '../../index';
88

packages/field/src/components/Percent/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { useIntl } from '@ant-design/pro-provider';
22
import { InputNumber } from 'antd';
3-
import { toNumber } from './util';
43
import type { ReactNode } from 'react';
54
import React, { Fragment, useMemo } from 'react';
65
import type { ProFieldFC } from '../../index';
76
import {
87
getColorByRealValue,
98
getRealTextWithPrecision,
109
getSymbolByRealValue,
10+
toNumber,
1111
} from './util';
1212

1313
// 兼容代码-----------

packages/field/src/components/Percent/util.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ export function toNumber(value: any): number {
3535
}
3636

3737
return Number(value);
38-
}
38+
}

packages/field/src/components/Progress/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { useIntl } from '@ant-design/pro-provider';
22
import { InputNumber, Progress } from 'antd';
3-
import { toNumber } from '../Percent/util';
43
import React, { useMemo } from 'react';
54
import type { ProFieldFC } from '../../index';
5+
import { toNumber } from '../Percent/util';
66

77
// 兼容代码-----------
88
import 'antd/lib/input-number/style';

packages/form/CHANGELOG.md

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
# Change Log
22

3-
All notable changes to this project will be documented in this file.
4-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
3+
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
54

65
## [2.31.4](https://github.com/ant-design/pro-components/compare/@ant-design/[email protected]...@ant-design/[email protected]) (2025-01-18)
76

87
**Note:** Version bump only for package @ant-design/pro-form
98

10-
11-
12-
13-
149
## [2.31.3](https://github.com/ant-design/pro-components/compare/@ant-design/[email protected]...@ant-design/[email protected]) (2025-01-06)
1510

1611
### Bug Fixes

packages/form/src/components/Submitter/index.tsx

+9-9
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ export type SubmitterProps<T = Record<string, any>> = {
2525
resetButtonProps?: false | (ButtonProps & { preventDefault?: boolean });
2626
/** @name 自定义操作的渲染 */
2727
render?:
28-
| ((
29-
props: SubmitterProps &
30-
T & {
31-
submit: () => void;
32-
reset: () => void;
33-
},
34-
dom: JSX.Element[],
35-
) => React.ReactNode[] | React.ReactNode | false)
36-
| false;
28+
| ((
29+
props: SubmitterProps &
30+
T & {
31+
submit: () => void;
32+
reset: () => void;
33+
},
34+
dom: JSX.Element[],
35+
) => React.ReactNode[] | React.ReactNode | false)
36+
| false;
3737
};
3838

3939
/**

packages/form/src/layouts/DrawerForm/index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
import type { DrawerProps, FormProps } from 'antd';
88
import { ConfigProvider, Drawer } from 'antd';
99
import classNames from 'classnames';
10-
import { merge } from 'rc-util/lib/utils/set';
1110
import useMergedState from 'rc-util/lib/hooks/useMergedState';
11+
import { merge } from 'rc-util/lib/utils/set';
1212
import { noteOnce } from 'rc-util/lib/warning';
1313
import React, {
1414
useCallback,
@@ -112,7 +112,7 @@ function DrawerForm<T = Record<string, any>, U = Record<string, any>>({
112112
);
113113
const resizeInfo: CustomizeResizeType = React.useMemo(() => {
114114
const defaultResize: CustomizeResizeType = {
115-
onResize: () => { },
115+
onResize: () => {},
116116
maxWidth: isBrowser() ? window.innerWidth * 0.8 : undefined,
117117
minWidth: 300,
118118
};

packages/form/src/layouts/ModalForm/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { openVisibleCompatible } from '@ant-design/pro-utils';
22
import type { FormProps, ModalProps } from 'antd';
33
import { ConfigProvider, Modal } from 'antd';
4-
import { merge } from 'rc-util/lib/utils/set';
54
import useMergedState from 'rc-util/lib/hooks/useMergedState';
5+
import { merge } from 'rc-util/lib/utils/set';
66
import { noteOnce } from 'rc-util/lib/warning';
77
import React, {
88
useCallback,

packages/form/src/layouts/StepsForm/StepForm.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { FormInstance, FormProps } from 'antd';
2-
import omit from 'rc-util/lib/omit';
32
import type { StepProps } from 'rc-steps/lib/Step';
3+
import omit from 'rc-util/lib/omit';
44
import { noteOnce } from 'rc-util/lib/warning';
55
import { useContext, useEffect, useImperativeHandle, useRef } from 'react';
66
import type { CommonFormProps } from '../../BaseForm';

packages/layout/CHANGELOG.md

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
# Change Log
22

3-
All notable changes to this project will be documented in this file.
4-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
3+
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
54

65
## [7.22.1](https://github.com/ant-design/pro-components/compare/@ant-design/[email protected]...@ant-design/[email protected]) (2025-01-18)
76

8-
97
### Bug Fixes
108

11-
* FooterToolbar supports SSR ([#8969](https://github.com/ant-design/pro-components/issues/8969)) ([0ddf168](https://github.com/ant-design/pro-components/commit/0ddf168abc0883c5f9cd56c80096964cc8396a98))
12-
13-
14-
15-
9+
- FooterToolbar supports SSR ([#8969](https://github.com/ant-design/pro-components/issues/8969)) ([0ddf168](https://github.com/ant-design/pro-components/commit/0ddf168abc0883c5f9cd56c80096964cc8396a98))
1610

1711
# [7.22.0](https://github.com/ant-design/pro-components/compare/@ant-design/[email protected]...@ant-design/[email protected]) (2025-01-06)
1812

packages/layout/src/ProLayout.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import { ConfigProvider, Layout } from 'antd';
1717
import type { AnyObject } from 'antd/es/_util/type';
1818
import type { ItemType } from 'antd/es/breadcrumb/Breadcrumb';
1919
import classNames from 'classnames';
20-
import omit from 'rc-util/lib/omit';
2120
import useMergedState from 'rc-util/lib/hooks/useMergedState';
21+
import omit from 'rc-util/lib/omit';
2222
import warning from 'rc-util/lib/warning';
2323
import type { CSSProperties } from 'react';
2424
import React, {

packages/layout/src/components/SettingDrawer/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ import {
2323
message,
2424
version,
2525
} from 'antd';
26-
import omit from 'rc-util/lib/omit';
2726
import useMergedState from 'rc-util/lib/hooks/useMergedState';
27+
import omit from 'rc-util/lib/omit';
2828
import React, { useEffect, useRef, useState } from 'react';
2929
import type { ProSettings } from '../../defaultSettings';
3030
import { defaultSettings } from '../../defaultSettings';

packages/list/CHANGELOG.md

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
# Change Log
22

3-
All notable changes to this project will be documented in this file.
4-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
3+
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
54

65
## [2.6.4](https://github.com/ant-design/pro-components/compare/@ant-design/[email protected]...@ant-design/[email protected]) (2025-01-18)
76

87
**Note:** Version bump only for package @ant-design/pro-list
98

10-
11-
12-
13-
149
## [2.6.3](https://github.com/ant-design/pro-components/compare/@ant-design/[email protected]...@ant-design/[email protected]) (2025-01-06)
1510

1611
### Bug Fixes

packages/table/CHANGELOG.md

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
# Change Log
22

3-
All notable changes to this project will be documented in this file.
4-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
3+
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
54

65
## [3.18.4](https://github.com/ant-design/pro-components/compare/@ant-design/[email protected]...@ant-design/[email protected]) (2025-01-18)
76

8-
97
### Bug Fixes
108

11-
* remove Table deadCode ([#8966](https://github.com/ant-design/pro-components/issues/8966)) ([5bfd5ca](https://github.com/ant-design/pro-components/commit/5bfd5cadd2f550d26b71a33ba1b66670d5cd7ec6))
12-
13-
14-
15-
9+
- remove Table deadCode ([#8966](https://github.com/ant-design/pro-components/issues/8966)) ([5bfd5ca](https://github.com/ant-design/pro-components/commit/5bfd5cadd2f550d26b71a33ba1b66670d5cd7ec6))
1610

1711
## [3.18.3](https://github.com/ant-design/pro-components/compare/@ant-design/[email protected]...@ant-design/[email protected]) (2025-01-06)
1812

packages/table/src/utils/genProColumnToColumn.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -163,5 +163,7 @@ export function genProColumnToColumn<T extends AnyObject>(
163163
};
164164
return omitUndefinedAndEmptyArr(tempColumns);
165165
})
166-
?.filter((item) => !item.hideInTable) as unknown as ColumnToColumnReturnType<T>;
166+
?.filter(
167+
(item) => !item.hideInTable,
168+
) as unknown as ColumnToColumnReturnType<T>;
167169
}

0 commit comments

Comments
 (0)