Skip to content

Commit

Permalink
deps: upgrade antd-tools and code style
Browse files Browse the repository at this point in the history
  • Loading branch information
benjycui committed May 25, 2017
1 parent 551b172 commit 0e5431d
Show file tree
Hide file tree
Showing 19 changed files with 25 additions and 24 deletions.
2 changes: 1 addition & 1 deletion components/affix/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function noop() {}
function getDefaultTarget() {
return typeof window !== 'undefined' ?
window : null;
};
}

// Affix
export interface AffixProps {
Expand Down
2 changes: 1 addition & 1 deletion components/auto-complete/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Select, { AbstractSelectProps, SelectValue, OptionProps, OptGroupProps }
import Input from '../input';
import InputElement from './InputElement';

export interface DataSourceItemObject { value: string; text: string; };
export interface DataSourceItemObject { value: string; text: string; }
export type DataSourceItemType = string | DataSourceItemObject;

export interface InputProps {
Expand Down
2 changes: 1 addition & 1 deletion components/badge/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export default class Badge extends React.Component<BadgeProps, any> {
component=""
showProp="data-show"
transitionName={children ? `${prefixCls}-zoom` : ''}
transitionAppear
transitionAppear={true}
>
{scrollNumber}
</Animate>
Expand Down
2 changes: 1 addition & 1 deletion components/breadcrumb/Breadcrumb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export interface BreadcrumbProps {
itemRender?: (route: any, params: any, routes: Array<any>, paths: Array<string>) => React.ReactNode;
style?: React.CSSProperties;
className?: string;
};
}

function getBreadcrumbName(route, params) {
if (!route.breadcrumbName) {
Expand Down
4 changes: 2 additions & 2 deletions components/date-picker/RangePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,15 @@ export default class RangePicker extends React.Component<any, any> {
<span className={props.pickerInputClass} disabled={props.disabled}>
<input
disabled={props.disabled}
readOnly
readOnly={true}
value={(start && start.format(props.format)) || ''}
placeholder={startPlaceholder}
className={`${prefixCls}-range-picker-input`}
/>
<span className={`${prefixCls}-range-picker-separator`}> ~ </span>
<input
disabled={props.disabled}
readOnly
readOnly={true}
value={(end && end.format(props.format)) || ''}
placeholder={endPlaceholder}
className={`${prefixCls}-range-picker-input`}
Expand Down
2 changes: 1 addition & 1 deletion components/date-picker/createPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export default function createPicker(TheCalendar): any {
<span>
<input
disabled={props.disabled}
readOnly
readOnly={true}
value={(inputValue && inputValue.format(props.format)) || ''}
placeholder={placeholder}
className={props.pickerInputClass}
Expand Down
2 changes: 1 addition & 1 deletion components/input/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function clearNextFrameAction(nextFrameId) {
export interface AutoSizeType {
minRows?: number;
maxRows?: number;
};
}

export interface InputProps {
prefixCls?: string;
Expand Down
2 changes: 1 addition & 1 deletion components/layout/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface BasicProps {
}

function generator(props) {
return (Basic) : any => {
return (Basic): any => {
return class Adapter extends React.Component<BasicProps, any> {
static Header: any;
static Footer: any;
Expand Down
3 changes: 2 additions & 1 deletion components/mention/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ export default class Mention extends React.Component<MentionProps, MentionState>
};
}

componentWillReceiveProps({ suggestions }) {
componentWillReceiveProps(nextProps: MentionProps) {
const { suggestions } = nextProps;
if (!shallowequal(suggestions, this.props.suggestions)) {
this.setState({
suggestions,
Expand Down
6 changes: 3 additions & 3 deletions components/modal/confirm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ export default function confirm(config) {
<ActionButton actionFn={props.onCancel} closeModal={close}>
{props.cancelText}
</ActionButton>
<ActionButton type="primary" actionFn={props.onOk} closeModal={close} autoFocus>
<ActionButton type="primary" actionFn={props.onOk} closeModal={close} autoFocus={true}>
{props.okText}
</ActionButton>
</div>
);
} else {
footer = (
<div className={`${prefixCls}-btns`}>
<ActionButton type="primary" actionFn={props.onOk} closeModal={close} autoFocus>
<ActionButton type="primary" actionFn={props.onOk} closeModal={close} autoFocus={true}>
{props.okText}
</ActionButton>
</div>
Expand All @@ -80,7 +80,7 @@ export default function confirm(config) {
<Dialog
className={classString}
onCancel={close.bind(this, { triggerCancel: true })}
visible
visible={true}
title=""
transitionName="zoom"
footer=""
Expand Down
2 changes: 1 addition & 1 deletion components/modal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Modal, { ModalFuncProps } from './Modal';
import confirm from './confirm';
import assign from 'object-assign';

export { ModalFuncProps }
export { ModalFuncProps };

Modal.info = function (props: ModalFuncProps) {
const config = assign({}, {
Expand Down
2 changes: 1 addition & 1 deletion components/pagination/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ abstract class Pagination extends React.Component<PaginationProps, any> {
selectPrefixCls: 'ant-select',
};

abstract getLocale()
abstract getLocale();

render() {
const { className, size, ...restProps } = this.props;
Expand Down
2 changes: 1 addition & 1 deletion components/popconfirm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ abstract class Popconfirm extends React.Component<PopconfirmProps, any> {
};
}

abstract getLocale()
abstract getLocale();

componentWillReceiveProps(nextProps: PopconfirmProps) {
if ('visible' in nextProps) {
Expand Down
2 changes: 1 addition & 1 deletion components/tabs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export default class Tabs extends React.Component<TabsProps, any> {
className={cls}
tabBarPosition={tabPosition}
renderTabBar={renderTabBar}
renderTabContent={() => <TabContent animated={tabPaneAnimated} animatedWithMargin />}
renderTabContent={() => <TabContent animated={tabPaneAnimated} animatedWithMargin={true} />}
onChange={this.handleChange}
>
{childrenWithClose || children}
Expand Down
2 changes: 1 addition & 1 deletion components/tag/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export default class Tag extends React.Component<TagProps, any> {
component=""
showProp="data-show"
transitionName={`${prefixCls}-zoom`}
transitionAppear
transitionAppear={true}
onEnd={this.animationEnd}
>
{tag}
Expand Down
2 changes: 1 addition & 1 deletion components/time-picker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ abstract class TimePicker extends React.Component<TimePickerProps, any> {
};
}

abstract getLocale()
abstract getLocale();

componentWillReceiveProps(nextProps: TimePickerProps) {
if ('value' in nextProps) {
Expand Down
6 changes: 3 additions & 3 deletions components/transfer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ abstract class Transfer extends React.Component<TransferProps, any> {
};
}

abstract getLocale()
abstract getLocale();

componentWillReceiveProps(nextProps: TransferProps) {
const { sourceSelectedKeys, targetSelectedKeys } = this.state;
Expand Down Expand Up @@ -227,10 +227,10 @@ abstract class Transfer extends React.Component<TransferProps, any> {

handleLeftSelectAll = (filteredDataSource, checkAll) => (
this.handleSelectAll('left', filteredDataSource, checkAll)
);
)
handleRightSelectAll = (filteredDataSource, checkAll) => (
this.handleSelectAll('right', filteredDataSource, checkAll)
);
)

handleFilter = (direction, e) => {
this.setState({
Expand Down
2 changes: 1 addition & 1 deletion components/tree-select/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ abstract class TreeSelect extends React.Component<TreeSelectProps, any> {
dropdownClassName: 'ant-select-tree-dropdown',
};

abstract getLocale()
abstract getLocale();

render() {
const locale = this.getLocale();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"@types/react": "^15.0.8",
"@types/react-dom": "~0.14.18",
"antd-demo-jest": "^1.0.5",
"antd-tools": "~0.19.1",
"antd-tools": "^1.2.0",
"babel-cli": "^6.18.0",
"babel-eslint": "^7.1.0",
"babel-jest": "^19.0.0",
Expand Down

0 comments on commit 0e5431d

Please sign in to comment.