Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge master to feature #16537

Merged
merged 29 commits into from May 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a4fb429
:bug: Fix disabled Option wrong hover color
afc163 May 8, 2019
9e478a4
:memo: optimize site info
afc163 May 8, 2019
4f74471
Merge pull request #16477 from ant-design/fix-disable-option-style
afc163 May 8, 2019
2d8396b
:bug: Avoid disabled Upload being triggered by label (#16483)
afc163 May 8, 2019
961328b
update list ts def (#16485)
zombieJ May 8, 2019
6d845f6
Update CHANGELOG.zh-CN.md
afc163 May 8, 2019
34d8ff8
:memo: update changelog
afc163 May 9, 2019
db5da92
Fix: Print reject error when ActionButton catch promise rejects
jas0ncn May 9, 2019
ff8d37f
refactor: Render function size reduce (#16244)
saxenanihal95 May 9, 2019
73a5b47
Merge pull request #16437 from jas0ncn/master
afc163 May 9, 2019
4505604
Update overview.zh-CN.md
Lyndon001 May 9, 2019
83c1670
Update overview.zh-CN.md
Lyndon001 May 9, 2019
62f8924
Fix hoist-non-react-statics compile error (#16397)
ztplz May 9, 2019
0030861
fix: customize icon in notification size not correct (#16507)
zombieJ May 9, 2019
681c6a5
fix doc (#16506)
nailuoGG May 9, 2019
cb30df5
fix(PageHeader): Should not render blank dom
yociduo May 9, 2019
90ee259
Update snapshot for test case
yociduo May 9, 2019
db8c54e
Merge pull request #16510 from yociduo/master
afc163 May 9, 2019
678c2e0
update snapshot (#16515)
zombieJ May 10, 2019
2bfecc3
📝 Update Menu docs (#16513)
hansnow May 10, 2019
0156886
fix: codesandbox not support slash import (#16509)
ycjcl868 May 10, 2019
fb8f947
Update confirm-promise.md
afc163 May 10, 2019
6eacfd7
fix[Select]: add missing type definition (#16504)
SylvanasGone May 10, 2019
6119095
fix(forms): improve field error method type defs
vicrep May 10, 2019
b3e90d7
Merge pull request #16524 from vicrep/patch-1
afc163 May 11, 2019
b8c5671
Just a spelling update
abgaryanharutyun May 11, 2019
16f7d66
Merge pull request #16531 from abgaryanharutyun/patch-2
afc163 May 12, 2019
b92020c
docs: 📝 changelog for 3.17.1 (#16534)
May 12, 2019
adfc435
merge master
yutingzhao1991 May 12, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 17 additions & 0 deletions CHANGELOG.en-US.md
Expand Up @@ -15,6 +15,23 @@ timeline: true

---

## 3.17.1

`2019-05-12`

- 🐞 Fix Form `hasFeedback` overlap issue with Input.Password. [#16445](https://github.com/ant-design/ant-design/pull/16445)
- 🐞 Fix Select selected and disabled item wrong hover color. [#16477](https://github.com/ant-design/ant-design/pull/16477)
- 🐞 Fix disabled Upload being triggered by label. [#16483](https://github.com/ant-design/ant-design/pull/16483)
- 🐞 Fix `hoist-non-react-statics` compilation error. [#16397](https://github.com/ant-design/ant-design/pull/16397) [@ztplz](https://github.com/ztplz)
- 🐞 Fix customize icon style in Notification size not correct. [#16507](https://github.com/ant-design/ant-design/pull/16507)
- 🐞 Fix PageHeader should not render blank dom when `title` is undefined. [#16510](https://github.com/ant-design/ant-design/pull/16510) [@yociduo](https://github.com/yociduo)
- ⚡️ Print reject error when Modal's `onOk` callback return an promise rejects. [#16437](https://github.com/ant-design/ant-design/pull/16437) [@jas0ncn](https://github.com/jas0ncn)
- TypeScript
- ⚡️ Improve Table column.filterDropdown type. [#16446](https://github.com/ant-design/ant-design/pull/16446)
- ⚡️ Add Select missing type definition `maxTagTextLength`. [#16504](https://github.com/ant-design/ant-design/pull/16504) [@SylvanasGone](https://github.com/SylvanasGone)
- ⚡️ Improve return type of `getFieldError` in Form. [#16524](https://github.com/ant-design/ant-design/pull/16524) [@vicrep](https://github.com/vicrep)
- 🐞 Fix List missing style prop definition. [#16485](https://github.com/ant-design/ant-design/pull/16485)

## 3.17.0

`2019-05-05`
Expand Down
35 changes: 26 additions & 9 deletions CHANGELOG.zh-CN.md
Expand Up @@ -15,29 +15,46 @@ timeline: true

---

## 3.17.1

`2019-05-12`

- 🐞 修复 Form `hasFeedback` 和 Input.Password 一起使用时互相重叠的问题。[#16445](https://github.com/ant-design/ant-design/pull/16445)
- 🐞 修复 Select 当前选中的失效项的样式问题。[#16477](https://github.com/ant-design/ant-design/pull/16477)
- 🐞 修复 Upload disabled 状态下会被 label 激活的问题。[#16483](https://github.com/ant-design/ant-design/pull/16483)
- 🐞 修复 `hoist-non-react-statics` 导致的编译错误问题。[#16397](https://github.com/ant-design/ant-design/pull/16397) [@ztplz](https://github.com/ztplz)
- 🐞 修复自定义图标在 Notification 组件中的大小不对的问题。[#16507](https://github.com/ant-design/ant-design/pull/16507)
- 🐞 修复 PageHeader 组件当 `title` 为空时不应该渲染空白元素的问题。[#16510](https://github.com/ant-design/ant-design/pull/16510) [@yociduo](https://github.com/yociduo)
- ⚡️ 当 Modal 组件 `onOk` 回调返回的 Promise 被 Reject 的时候,打印错误。[#16437](https://github.com/ant-design/ant-design/pull/16437) [@jas0ncn](https://github.com/jas0ncn)
- TypeScript
- ⚡️ 完善 Table 中 `column.filterDropdown` 的定义。[#16446](https://github.com/ant-design/ant-design/pull/16446)
- ⚡️ 添加 Select 中 `maxTagTextLength` 的定义。[#16504](https://github.com/ant-design/ant-design/pull/16504) [@SylvanasGone](https://github.com/SylvanasGone)
- ⚡️ 完善 Form 中 `getFieldError` 的返回值的定义。[#16524](https://github.com/ant-design/ant-design/pull/16524) [@vicrep](https://github.com/vicrep)
- 🐞 修复 List 组件缺少 `style` 定义的问题。[#16485](https://github.com/ant-design/ant-design/pull/16485)

## 3.17.0

`2019-05-05`

- 🎉 Breadcrumb.Item 支持 `overlay` props 来定义下拉菜单。[#16315](https://github.com/ant-design/ant-design/pull/16315)
- 🎉 Breadcrumb.Item 支持 `overlay` 属性来定义下拉菜单。[#16315](https://github.com/ant-design/ant-design/pull/16315)
- 🎉 Button 的增加了新的类型 `link`。[#16289](https://github.com/ant-design/ant-design/pull/16289)
- ⌨️ 用`ul`包裹 List.Item,以增加可访问性。[#15890](https://github.com/ant-design/ant-design/pull/15890)
- 🌟 TreeSelect 的 `showSearch` 支持多选模式。[#15933](https://github.com/ant-design/ant-design/pull/15933)
- 🌟 Upload 提供 `previewFile` props 以自定义预览逻辑。[#15984](https://github.com/ant-design/ant-design/pull/15984)
- 🌟 Upload 提供 `previewFile` 属性以自定义预览逻辑。[#15984](https://github.com/ant-design/ant-design/pull/15984)
- 🌟 添加了 `@table-selected-row-color` 变量来自定义表格选中的颜色。[#15971](https://github.com/ant-design/ant-design/pull/15971) [@hextion](https://github.com/hextion)
- 🌟 添加了 `@form-warning-input-bg` 和 `@form-error-input-bg` 变量来自定义表单错误状态时的背景颜色。[#15954](https://github.com/ant-design/ant-design/pull/15954) [@hextion](https://github.com/hextion)
- 🌟 Dropdown.Button 支持 `icon` props 来自定义图标。[#15996](https://github.com/ant-design/ant-design/pull/15996) [@DiamondYuan](https://github.com/DiamondYuan)
- 🌟 SkeletonAvatarProps 的 `size` props 支持传入数字。[#16128](https://github.com/ant-design/ant-design/pull/16128) [@MrHeer](https://github.com/MrHeer)
- 🌟 Dropdown.Button 支持 `icon` 属性来自定义图标。[#15996](https://github.com/ant-design/ant-design/pull/15996) [@DiamondYuan](https://github.com/DiamondYuan)
- 🌟 SkeletonAvatarProps 的 `size` 属性支持传入数字。[#16128](https://github.com/ant-design/ant-design/pull/16128) [@MrHeer](https://github.com/MrHeer)
- 🌟 notification.config 现在支持 `getContainer` 来进行自定义 dom 渲染位置。[#16123](https://github.com/ant-design/ant-design/pull/16123) [@Nouzbe](https://github.com/Nouzbe)
- 🌟 Drawer 支持 `afterVisibleChange` props,在抽屉动画完成后触发。[#16228](https://github.com/ant-design/ant-design/pull/16228)
- 🌟 Form.Item 支持了 `htmlFor` props. [#16278](https://github.com/ant-design/ant-design/pull/16278)
- 🌟 Collapse 支持 `expandIconPosition` props。[#16365](https://github.com/ant-design/ant-design/pull/16365)
- 🌟 Drawer 支持 `afterVisibleChange` 属性,在抽屉动画完成后触发。[#16228](https://github.com/ant-design/ant-design/pull/16228)
- 🌟 Form.Item 支持了 `htmlFor` 属性. [#16278](https://github.com/ant-design/ant-design/pull/16278)
- 🌟 Collapse 支持 `expandIconPosition` 属性。[#16365](https://github.com/ant-design/ant-design/pull/16365)
- 🌟 Carousel 支持自定义面板指示点的位置。[#16225](https://github.com/ant-design/ant-design/pull/16225) [@yociduo](https://github.com/yociduo)
- 🌟 TreeNode 支持 `checkable` 的属性。[#16369](https://github.com/ant-design/ant-design/pull/16369)
- 🌟 TreeNode 支持 `checkable` 属性。[#16369](https://github.com/ant-design/ant-design/pull/16369)
- 🌟 🇭🇷 新增克罗地亚语言包。[#15641](https://github.com/ant-design/ant-design/pull/15641) [@fpintaric](https://github.com/fpintaric)
- 🐞 修复 Drawer 组件的弹出动画闪烁的问题。[#16358](https://github.com/ant-design/ant-design/pull/16358)
- 🐞 修复 Slider 的文字会换行的问题。[#15128](https://github.com/ant-design/ant-design/pull/15128)
- 🐞 修复 Checkbox.Group `onChange` 会包含移除值得问题。[#16392](https://github.com/ant-design/ant-design/pull/16392)
- 🐞 修复 Checkbox.Group `onChange` 会包含已移除的值的问题。[#16392](https://github.com/ant-design/ant-design/pull/16392)
- 🐞 修正了多处 Typescript 的类型错误。[#16043](https://github.com/ant-design/ant-design/pull/16043) [#16341](https://github.com/ant-design/ant-design/pull/16341) [#16343](https://github.com/ant-design/ant-design/pull/16343) [#16360](https://github.com/ant-design/ant-design/pull/16360) [#16344](https://github.com/ant-design/ant-design/pull/16344)

## 3.16.6
Expand Down
2 changes: 1 addition & 1 deletion components/button/style/mixin.less
Expand Up @@ -270,7 +270,7 @@
.button-size(@btn-circle-size-sm; 0; @font-size-base; 50%);
}
}
// Horizontal button groups styl
// Horizontal button groups style
// --------------------------------------------------
.btn-group(@btnClassName: btn) {
.button-group-base(@btnClassName);
Expand Down
Expand Up @@ -8162,11 +8162,10 @@ exports[`ConfigProvider components Modal configProvider 1`] = `
style="width:520px"
>
<div
aria-hidden="true"
style="width:0;height:0;overflow:hidden"
tabindex="0"
>
sentinelStart
</div>
/>
<div
class="config-modal-content"
>
Expand Down Expand Up @@ -8227,11 +8226,10 @@ exports[`ConfigProvider components Modal configProvider 1`] = `
</div>
</div>
<div
aria-hidden="true"
style="width:0;height:0;overflow:hidden"
tabindex="0"
>
sentinelEnd
</div>
/>
</div>
</div>
</div>
Expand All @@ -8255,11 +8253,10 @@ exports[`ConfigProvider components Modal normal 1`] = `
style="width:520px"
>
<div
aria-hidden="true"
style="width:0;height:0;overflow:hidden"
tabindex="0"
>
sentinelStart
</div>
/>
<div
class="ant-modal-content"
>
Expand Down Expand Up @@ -8320,11 +8317,10 @@ exports[`ConfigProvider components Modal normal 1`] = `
</div>
</div>
<div
aria-hidden="true"
style="width:0;height:0;overflow:hidden"
tabindex="0"
>
sentinelEnd
</div>
/>
</div>
</div>
</div>
Expand All @@ -8348,11 +8344,10 @@ exports[`ConfigProvider components Modal prefixCls 1`] = `
style="width:520px"
>
<div
aria-hidden="true"
style="width:0;height:0;overflow:hidden"
tabindex="0"
>
sentinelStart
</div>
/>
<div
class="prefix-Modal-content"
>
Expand Down Expand Up @@ -8413,11 +8408,10 @@ exports[`ConfigProvider components Modal prefixCls 1`] = `
</div>
</div>
<div
aria-hidden="true"
style="width:0;height:0;overflow:hidden"
tabindex="0"
>
sentinelEnd
</div>
/>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions components/form/Form.tsx
Expand Up @@ -171,8 +171,8 @@ export type WrappedFormUtils<V = any> = {
validateFieldsAndScroll(options: ValidateFieldsOptions): void;
validateFieldsAndScroll(): void;
/** 获取某个输入控件的 Error */
getFieldError(name: string): Object[];
getFieldsError(names?: Array<string>): Object;
getFieldError(name: string): string[] | undefined;
getFieldsError(names?: Array<string>): Record<string, string[] | undefined>;
/** 判断一个输入控件是否在校验状态 */
isFieldValidating(name: string): boolean;
isFieldTouched(name: string): boolean;
Expand Down
65 changes: 63 additions & 2 deletions components/form/interface.ts
@@ -1,8 +1,69 @@
import * as React from 'react';
import * as hoistNonReactStatics from 'hoist-non-react-statics';
import { Omit } from '../_util/type';
import { WrappedFormInternalProps } from './Form';

// Heavily copied from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/hoist-non-react-statics/index.d.ts
// tslint:disable-next-line:class-name
interface REACT_STATICS {
childContextTypes: true;
contextType: true;
contextTypes: true;
defaultProps: true;
displayName: true;
getDefaultProps: true;
getDerivedStateFromError: true;
getDerivedStateFromProps: true;
mixins: true;
propTypes: true;
type: true;
}

// tslint:disable-next-line:class-name
interface KNOWN_STATICS {
name: true;
length: true;
prototype: true;
caller: true;
callee: true;
arguments: true;
arity: true;
}

// tslint:disable-next-line:class-name
interface MEMO_STATICS {
$$typeof: true;
compare: true;
defaultProps: true;
displayName: true;
propTypes: true;
type: true;
}

// tslint:disable-next-line:class-name
interface FORWARD_REF_STATICS {
$$typeof: true;
render: true;
defaultProps: true;
displayName: true;
propTypes: true;
}

type NonReactStatics<
S extends React.ComponentType<any>,
C extends {
[key: string]: true;
} = {}
> = {
[key in Exclude<
keyof S,
S extends React.MemoExoticComponent<any>
? keyof MEMO_STATICS | keyof C
: S extends React.ForwardRefExoticComponent<any>
? keyof FORWARD_REF_STATICS | keyof C
: keyof REACT_STATICS | keyof KNOWN_STATICS | keyof C
>]: S[key]
};

// Copy from @types/react-redux https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-redux/index.d.ts
export type Matching<InjectedProps, DecorationTargetProps> = {
[P in keyof DecorationTargetProps]: P extends keyof InjectedProps
Expand All @@ -17,7 +78,7 @@ export type GetProps<C> = C extends React.ComponentType<infer P> ? P : never;
export type ConnectedComponentClass<C extends React.ComponentType<any>, P> = React.ComponentClass<
JSX.LibraryManagedAttributes<C, P>
> &
hoistNonReactStatics.NonReactStatics<C> & {
NonReactStatics<C> & {
WrappedComponent: C;
};

Expand Down
1 change: 1 addition & 0 deletions components/list/index.tsx
Expand Up @@ -34,6 +34,7 @@ export type ListItemLayout = 'horizontal' | 'vertical';
export interface ListProps<T> {
bordered?: boolean;
className?: string;
style?: React.CSSProperties;
children?: React.ReactNode;
dataSource: T[];
extra?: React.ReactNode;
Expand Down