Skip to content

Commit

Permalink
♻️ cleanup: format code and remove unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshuai2144 committed Jan 18, 2025
1 parent ac1425f commit 304d24d
Show file tree
Hide file tree
Showing 23 changed files with 105 additions and 146 deletions.
9 changes: 9 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## @ant-design/pro-components@2.8.4

`2025-01-18`

- cleanup: replace omit.js & remove some duplicate util (#8965) (2 天前) <𝑾𝒖𝒙𝒉>
- fix: remove Table deadCode (#8966) (2 天前) <chenliandong>
- chore: try fix test (#8974) (4 天前) <𝑾𝒖𝒙𝒉>
- fix: FooterToolbar supports SSR (#8969) (4 天前) <谭真>

## @ant-design/pro-components@2.8.3

`2025-01-06`
Expand Down
7 changes: 1 addition & 6 deletions packages/card/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
# Change Log

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

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

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





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

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion packages/card/src/components/Card/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { ConfigProvider, Tabs } from 'antd';

import useBreakpoint from 'antd/es/grid/hooks/useBreakpoint';
import classNames from 'classnames';
import omit from 'rc-util/lib/omit';
import useMergedState from 'rc-util/lib/hooks/useMergedState';
import omit from 'rc-util/lib/omit';
import React, { useContext } from 'react';
import type { Breakpoint, CardProps, Gutter } from '../../typing';
import Actions from '../Actions';
Expand Down
7 changes: 1 addition & 6 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
# Change Log

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

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

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





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

### Bug Fixes
Expand Down
7 changes: 1 addition & 6 deletions packages/descriptions/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
# Change Log

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

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

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





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

### Bug Fixes
Expand Down
7 changes: 1 addition & 6 deletions packages/field/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
# Change Log

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

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

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





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

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion packages/field/src/components/Money/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { intlMap as allIntlMap, useIntl } from '@ant-design/pro-provider';
import type { InputNumberProps } from 'antd';
import { InputNumber, Popover } from 'antd';
import omit from 'rc-util/lib/omit';
import useMergedState from 'rc-util/lib/hooks/useMergedState';
import omit from 'rc-util/lib/omit';
import React, { useCallback, useMemo } from 'react';
import type { ProFieldFC } from '../../index';

Expand Down
2 changes: 1 addition & 1 deletion packages/field/src/components/Percent/index.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { useIntl } from '@ant-design/pro-provider';
import { InputNumber } from 'antd';
import { toNumber } from './util';
import type { ReactNode } from 'react';
import React, { Fragment, useMemo } from 'react';
import type { ProFieldFC } from '../../index';
import {
getColorByRealValue,
getRealTextWithPrecision,
getSymbolByRealValue,
toNumber,
} from './util';

// 兼容代码-----------
Expand Down
2 changes: 1 addition & 1 deletion packages/field/src/components/Percent/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ export function toNumber(value: any): number {
}

return Number(value);
}
}
2 changes: 1 addition & 1 deletion packages/field/src/components/Progress/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useIntl } from '@ant-design/pro-provider';
import { InputNumber, Progress } from 'antd';
import { toNumber } from '../Percent/util';
import React, { useMemo } from 'react';
import type { ProFieldFC } from '../../index';
import { toNumber } from '../Percent/util';

// 兼容代码-----------
import 'antd/lib/input-number/style';
Expand Down
7 changes: 1 addition & 6 deletions packages/form/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
# Change Log

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

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

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





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

### Bug Fixes
Expand Down
18 changes: 9 additions & 9 deletions packages/form/src/components/Submitter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ export type SubmitterProps<T = Record<string, any>> = {
resetButtonProps?: false | (ButtonProps & { preventDefault?: boolean });
/** @name 自定义操作的渲染 */
render?:
| ((
props: SubmitterProps &
T & {
submit: () => void;
reset: () => void;
},
dom: JSX.Element[],
) => React.ReactNode[] | React.ReactNode | false)
| false;
| ((
props: SubmitterProps &
T & {
submit: () => void;
reset: () => void;
},
dom: JSX.Element[],
) => React.ReactNode[] | React.ReactNode | false)
| false;
};

/**
Expand Down
4 changes: 2 additions & 2 deletions packages/form/src/layouts/DrawerForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import type { DrawerProps, FormProps } from 'antd';
import { ConfigProvider, Drawer } from 'antd';
import classNames from 'classnames';
import { merge } from 'rc-util/lib/utils/set';
import useMergedState from 'rc-util/lib/hooks/useMergedState';
import { merge } from 'rc-util/lib/utils/set';
import { noteOnce } from 'rc-util/lib/warning';
import React, {
useCallback,
Expand Down Expand Up @@ -112,7 +112,7 @@ function DrawerForm<T = Record<string, any>, U = Record<string, any>>({
);
const resizeInfo: CustomizeResizeType = React.useMemo(() => {
const defaultResize: CustomizeResizeType = {
onResize: () => { },
onResize: () => {},
maxWidth: isBrowser() ? window.innerWidth * 0.8 : undefined,
minWidth: 300,
};
Expand Down
2 changes: 1 addition & 1 deletion packages/form/src/layouts/ModalForm/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { openVisibleCompatible } from '@ant-design/pro-utils';
import type { FormProps, ModalProps } from 'antd';
import { ConfigProvider, Modal } from 'antd';
import { merge } from 'rc-util/lib/utils/set';
import useMergedState from 'rc-util/lib/hooks/useMergedState';
import { merge } from 'rc-util/lib/utils/set';
import { noteOnce } from 'rc-util/lib/warning';
import React, {
useCallback,
Expand Down
2 changes: 1 addition & 1 deletion packages/form/src/layouts/StepsForm/StepForm.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { FormInstance, FormProps } from 'antd';
import omit from 'rc-util/lib/omit';
import type { StepProps } from 'rc-steps/lib/Step';
import omit from 'rc-util/lib/omit';
import { noteOnce } from 'rc-util/lib/warning';
import { useContext, useEffect, useImperativeHandle, useRef } from 'react';
import type { CommonFormProps } from '../../BaseForm';
Expand Down
10 changes: 2 additions & 8 deletions packages/layout/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
# Change Log

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

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


### Bug Fixes

* FooterToolbar supports SSR ([#8969](https://github.com/ant-design/pro-components/issues/8969)) ([0ddf168](https://github.com/ant-design/pro-components/commit/0ddf168abc0883c5f9cd56c80096964cc8396a98))




- FooterToolbar supports SSR ([#8969](https://github.com/ant-design/pro-components/issues/8969)) ([0ddf168](https://github.com/ant-design/pro-components/commit/0ddf168abc0883c5f9cd56c80096964cc8396a98))

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

Expand Down
2 changes: 1 addition & 1 deletion packages/layout/src/ProLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import { ConfigProvider, Layout } from 'antd';
import type { AnyObject } from 'antd/es/_util/type';
import type { ItemType } from 'antd/es/breadcrumb/Breadcrumb';
import classNames from 'classnames';
import omit from 'rc-util/lib/omit';
import useMergedState from 'rc-util/lib/hooks/useMergedState';
import omit from 'rc-util/lib/omit';
import warning from 'rc-util/lib/warning';
import type { CSSProperties } from 'react';
import React, {
Expand Down
2 changes: 1 addition & 1 deletion packages/layout/src/components/SettingDrawer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import {
message,
version,
} from 'antd';
import omit from 'rc-util/lib/omit';
import useMergedState from 'rc-util/lib/hooks/useMergedState';
import omit from 'rc-util/lib/omit';
import React, { useEffect, useRef, useState } from 'react';
import type { ProSettings } from '../../defaultSettings';
import { defaultSettings } from '../../defaultSettings';
Expand Down
7 changes: 1 addition & 6 deletions packages/list/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
# Change Log

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

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

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





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

### Bug Fixes
Expand Down
10 changes: 2 additions & 8 deletions packages/table/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
# Change Log

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

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


### Bug Fixes

* remove Table deadCode ([#8966](https://github.com/ant-design/pro-components/issues/8966)) ([5bfd5ca](https://github.com/ant-design/pro-components/commit/5bfd5cadd2f550d26b71a33ba1b66670d5cd7ec6))




- remove Table deadCode ([#8966](https://github.com/ant-design/pro-components/issues/8966)) ([5bfd5ca](https://github.com/ant-design/pro-components/commit/5bfd5cadd2f550d26b71a33ba1b66670d5cd7ec6))

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

Expand Down
4 changes: 3 additions & 1 deletion packages/table/src/utils/genProColumnToColumn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,5 +163,7 @@ export function genProColumnToColumn<T extends AnyObject>(
};
return omitUndefinedAndEmptyArr(tempColumns);
})
?.filter((item) => !item.hideInTable) as unknown as ColumnToColumnReturnType<T>;
?.filter(
(item) => !item.hideInTable,
) as unknown as ColumnToColumnReturnType<T>;
}
Loading

0 comments on commit 304d24d

Please sign in to comment.