Remove allowSyntheticDefaultImports (#8218)

This commit is contained in:
Wei Zhu 2017-11-17 14:38:54 +08:00 committed by GitHub
parent fdf0c11ec7
commit 479a5cb743
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
143 changed files with 205 additions and 233 deletions

View File

@ -42,4 +42,9 @@ module.exports = {
snapshotSerializers: [
'enzyme-to-json/serializer',
],
globals: {
'ts-jest': {
tsConfigFile: './tsconfig.test.json',
}
},
};

View File

@ -18,4 +18,9 @@ module.exports = {
snapshotSerializers: [
'enzyme-to-json/serializer'
],
globals: {
'ts-jest': {
tsConfigFile: './tsconfig.test.json',
}
},
};

View File

@ -60,20 +60,7 @@ import 'antd/dist/antd.css'; // or 'antd/dist/antd.less'
## TypeScript
```js
// tsconfig.json
{
"compilerOptions": {
"moduleResolution": "node",
"jsx": "preserve",
"allowSyntheticDefaultImports": true
}
}
```
> 注意:
> - 设置 `allowSyntheticDefaultImports` 避免 `error TS1192: Module 'react' has no default export` 的错误。
> - 不要使用 @types/antd, antd 已经自带了 TypeScript 定义。
- 不要使用 @types/antd, antd 已经自带了 TypeScript 定义。
## 国际化

View File

@ -86,20 +86,7 @@ import 'antd/dist/antd.css'; // or 'antd/dist/antd.less'
### TypeScript
```js
// tsconfig.json
{
"compilerOptions": {
"moduleResolution": "node",
"jsx": "preserve",
"allowSyntheticDefaultImports": true
}
}
```
> Note:
> - set `allowSyntheticDefaultImports` to prevent `error TS1192: Module 'react' has no default export`.
> - Don't use @types/antd, antd provide a built-in ts definition already.
- Don't use @types/antd, antd provide a built-in ts definition already.
#### Use [ts-import-plugin](https://github.com/Brooooooklyn/ts-import-plugin) with modularized antd

View File

@ -0,0 +1,5 @@
// https://github.com/moment/moment/issues/3650
export default function callMoment(moment, ...args) {
return (moment.default || moment)(...args);
}

View File

@ -1,5 +1,5 @@
import React from 'react';
import ReactDOM from 'react-dom';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
import addEventListener from 'rc-util/lib/Dom/addEventListener';
import classNames from 'classnames';

View File

@ -1,5 +1,5 @@
import React from 'react';
import ReactDOM from 'react-dom';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import Animate from 'rc-animate';
import Icon from '../icon';
import classNames from 'classnames';

View File

@ -1,5 +1,5 @@
import React from 'react';
import ReactDOM from 'react-dom';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import addEventListener from 'rc-util/lib/Dom/addEventListener';

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';

View File

@ -1,5 +1,5 @@
import React from 'react';
import { findDOMNode } from 'react-dom';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
export interface InputElementProps {
children: React.ReactElement<any>;
@ -9,10 +9,10 @@ export default class InputElement extends React.Component<InputElementProps, any
private ele: HTMLInputElement;
focus = () => {
this.ele.focus ? this.ele.focus() : (findDOMNode(this.ele) as HTMLInputElement).focus();
this.ele.focus ? this.ele.focus() : (ReactDOM.findDOMNode(this.ele) as HTMLInputElement).focus();
}
blur = () => {
this.ele.blur ? this.ele.blur() : (findDOMNode(this.ele) as HTMLInputElement).blur();
this.ele.blur ? this.ele.blur() : (ReactDOM.findDOMNode(this.ele) as HTMLInputElement).blur();
}
saveRef = (ele: HTMLInputElement) => {
this.ele = ele;

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { Option, OptGroup } from 'rc-select';
import classNames from 'classnames';
import Select, { AbstractSelectProps, SelectValue, OptionProps, OptGroupProps } from '../select';

View File

@ -1,5 +1,5 @@
import React from 'react';
import ReactDOM from 'react-dom';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import Icon from '../icon';
import classNames from 'classnames';

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import Animate from 'rc-animate';
import addEventListener from 'rc-util/lib/Dom/addEventListener';
import classNames from 'classnames';

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { createElement, Component } from 'react';
import omit from 'omit.js';
import classNames from 'classnames';

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import PropTypes from 'prop-types';
import Animate from 'rc-animate';
import ScrollNumber from './ScrollNumber';

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import PropTypes from 'prop-types';
import { cloneElement } from 'react';
import warning from '../_util/warning';

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import PropTypes from 'prop-types';
export interface BreadcrumbItemProps {

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import classNames from 'classnames';
import { ButtonSize } from './button';

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import omit from 'omit.js';

View File

@ -1,5 +1,5 @@
import React from 'react';
import moment from 'moment';
import * as React from 'react';
import * as moment from 'moment';
import { PREFIX_CLS } from './Constants';
import Select from '../select';
import { Group, Button } from '../radio';

View File

@ -1,10 +1,12 @@
import React from 'react';
import * as React from 'react';
import PropTypes from 'prop-types';
import moment from 'moment';
import * as moment from 'moment';
import FullCalendar from 'rc-calendar/lib/FullCalendar';
import LocaleReceiver from '../locale-provider/LocaleReceiver';
import { PREFIX_CLS } from './Constants';
import Header from './Header';
import callMoment from '../_util/callMoment';
declare const require: Function;
export { HeaderProps } from './Header';
@ -71,7 +73,7 @@ export default class Calendar extends React.Component<CalendarProps, CalendarSta
constructor(props, context) {
super(props, context);
const value = props.value || props.defaultValue || moment();
const value = props.value || props.defaultValue || callMoment(moment);
if (!moment.isMoment(value)) {
throw new Error(
'The value/defaultValue of Calendar must be a moment object after `antd@2.0`, ' +

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import classNames from 'classnames';
export interface CardGridProps {

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import classNames from 'classnames';
export interface CardMetaProps {

View File

@ -1,4 +1,4 @@
import React, { Component, Children } from 'react';
import * as React from 'react';
import classNames from 'classnames';
import addEventListener from 'rc-util/lib/Dom/addEventListener';
import omit from 'omit.js';
@ -38,7 +38,7 @@ export interface CardProps {
onTabChange?: (key: string) => void;
}
export default class Card extends Component<CardProps, {}> {
export default class Card extends React.Component<CardProps, {}> {
static Grid: typeof Grid = Grid;
static Meta: typeof Meta = Meta;
resizeEvent: any;
@ -93,7 +93,7 @@ export default class Card extends Component<CardProps, {}> {
}
isContainGrid() {
let containGrid;
Children.forEach(this.props.children, (element: JSX.Element) => {
React.Children.forEach(this.props.children, (element: JSX.Element) => {
if (element && element.type && element.type === Grid) {
containGrid = true;
}

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import debounce from 'lodash.debounce';
// matchMedia polyfill for

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import RcCascader from 'rc-cascader';
import arrayTreeFilter from 'array-tree-filter';
import classNames from 'classnames';

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import RcCheckbox from 'rc-checkbox';

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import shallowEqual from 'shallowequal';

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import RcCollapse from 'rc-collapse';
import classNames from 'classnames';
import animation from '../_util/openAnimation';

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import CalendarLocale from 'rc-calendar/lib/locale/zh_CN';
import RcCalendar from 'rc-calendar';
import warning from 'warning';

View File

@ -1,11 +1,12 @@
/* tslint:disable jsx-no-multiline-js */
import React from 'react';
import moment from 'moment';
import * as React from 'react';
import * as moment from 'moment';
import RangeCalendar from 'rc-calendar/lib/RangeCalendar';
import RcDatePicker from 'rc-calendar/lib/Picker';
import classNames from 'classnames';
import Icon from '../icon';
import warning from '../_util/warning';
import callMoment from '../_util/callMoment';
function getShowDateFromValue(value: moment.Moment[]): moment.Moment[] | undefined {
const [start, end] = value;
@ -60,7 +61,7 @@ export default class RangePicker extends React.Component<any, any> {
const pickerValue = !value || isEmptyArray(value) ? props.defaultPickerValue : value;
this.state = {
value,
showDate: pickerValueAdapter(pickerValue || moment()),
showDate: pickerValueAdapter(pickerValue || callMoment(moment)),
open: props.open,
hoverValue: [],
};

View File

@ -1,5 +1,5 @@
import React, { Component } from 'react';
import moment from 'moment';
import * as React from 'react';
import * as moment from 'moment';
import Calendar from 'rc-calendar';
import RcDatePicker from 'rc-calendar/lib/Picker';
import classNames from 'classnames';
@ -9,7 +9,7 @@ function formatValue(value: moment.Moment | undefined, format: string): string {
return (value && value.format(format)) || '';
}
export default class WeekPicker extends Component<any, any> {
export default class WeekPicker extends React.Component<any, any> {
static defaultProps = {
format: 'YYYY-Wo',
allowClear: true,

View File

@ -1,11 +1,12 @@
import React from 'react';
import moment from 'moment';
import * as React from 'react';
import * as moment from 'moment';
import MonthCalendar from 'rc-calendar/lib/MonthCalendar';
import RcDatePicker from 'rc-calendar/lib/Picker';
import classNames from 'classnames';
import omit from 'omit.js';
import Icon from '../icon';
import warning from '../_util/warning';
import callMoment from '../_util/callMoment';
export interface PickerProps {
value?: moment.Moment;
@ -104,7 +105,7 @@ export default function createPicker(TheCalendar): any {
disabledTime={disabledTime}
locale={locale.lang}
timePicker={props.timePicker}
defaultValue={props.defaultPickerValue || moment()}
defaultValue={props.defaultPickerValue || callMoment(moment)}
dateInputPlaceholder={placeholder}
prefixCls={prefixCls}
className={calendarClassName}

View File

@ -1,5 +1,5 @@
import React from 'react';
import moment from 'moment';
import * as React from 'react';
import * as moment from 'moment';
import RcCalendar from 'rc-calendar';
import MonthCalendar from 'rc-calendar/lib/MonthCalendar';
import createPicker from './createPicker';

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import TimePickerPanel from 'rc-time-picker/lib/Panel';
import classNames from 'classnames';
import LocaleReceiver from '../locale-provider/LocaleReceiver';

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import classNames from 'classnames';
export default function Divider({

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import Button from '../button';
import { ButtonGroupProps } from '../button/button-group';
import Icon from '../icon';

View File

@ -1,4 +1,4 @@
import React, { cloneElement } from 'react';
import * as React from 'react';
import RcDropdown from 'rc-dropdown';
import classNames from 'classnames';
import DropdownButton from './dropdown-button';
@ -46,7 +46,7 @@ export default class Dropdown extends React.Component<DropDownProps, any> {
render() {
const { children, prefixCls, overlay, trigger, disabled } = this.props;
const dropdownTrigger = cloneElement(children as any, {
const dropdownTrigger = React.cloneElement(children as any, {
className: classNames((children as any).props.className, `${prefixCls}-trigger`),
disabled,
});
@ -54,7 +54,7 @@ export default class Dropdown extends React.Component<DropDownProps, any> {
const overlayProps = overlay && (overlay as any).props;
const selectable = (overlayProps && 'selectable' in overlayProps)
? overlayProps.selectable : false;
const fixedModeOverlay = cloneElement(overlay as any, {
const fixedModeOverlay = React.cloneElement(overlay as any, {
mode: 'vertical',
selectable,
});

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import createDOMForm from 'rc-form/lib/createDOMForm';

View File

@ -1,5 +1,5 @@
import React from 'react';
import { findDOMNode } from 'react-dom';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import Animate from 'rc-animate';
@ -230,7 +230,7 @@ export default class FormItem extends React.Component<FormItemProps, any> {
const controls = document.querySelectorAll(`[id="${id}"]`);
if (controls.length !== 1) {
e.preventDefault();
const control = findDOMNode(this).querySelector(`[id="${id}"]`) as HTMLElement;
const control = ReactDOM.findDOMNode(this).querySelector(`[id="${id}"]`) as HTMLElement;
if (control && control.focus) {
control.focus();
}

View File

@ -1,5 +1,5 @@
/* tslint:disable */
import React from 'react';
import * as React from 'react';
import Form, { FormComponentProps } from '../Form';
// test Form.create on component without own props

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';

View File

@ -16,7 +16,7 @@ if (typeof window !== 'undefined') {
enquire = require('enquire.js');
}
import React from 'react';
import * as React from 'react';
import { Children, cloneElement } from 'react';
import classNames from 'classnames';
import PropTypes from 'prop-types';

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import classNames from 'classnames';
import omit from 'omit.js';

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import classNames from 'classnames';
import RcInputNumber from 'rc-input-number';

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import classNames from 'classnames';
export interface GroupProps {

View File

@ -1,4 +1,4 @@
import React, { Component, cloneElement } from 'react';
import * as React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import omit from 'omit.js';
@ -45,7 +45,7 @@ export interface InputProps extends AbstractInputProps {
autoFocus?: boolean;
}
export default class Input extends Component<InputProps, any> {
export default class Input extends React.Component<InputProps, any> {
static Group: typeof Group;
static Search: typeof Search;
static TextArea: typeof TextArea;
@ -148,7 +148,7 @@ export default class Input extends Component<InputProps, any> {
>
<span className={className}>
{addonBefore}
{cloneElement(children, { style: null })}
{React.cloneElement(children, { style: null })}
{addonAfter}
</span>
</span>
@ -187,7 +187,7 @@ export default class Input extends Component<InputProps, any> {
style={props.style}
>
{prefix}
{cloneElement(children, { style: null, className: this.getInputClassName() })}
{React.cloneElement(children, { style: null, className: this.getInputClassName() })}
{suffix}
</span>
);

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import classNames from 'classnames';
import Input, { InputProps } from './Input';
import Icon from '../icon';

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import omit from 'omit.js';
import classNames from 'classnames';
import { AbstractInputProps } from './Input';

View File

@ -14,7 +14,7 @@ if (typeof window !== 'undefined') {
window.matchMedia = window.matchMedia || matchMediaPolyfill;
}
import React from 'react';
import * as React from 'react';
import classNames from 'classnames';
import omit from 'omit.js';
import PropTypes from 'prop-types';

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { SiderProps } from './Sider';

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { Col } from '../grid';

View File

@ -1,4 +1,4 @@
import React, { Component } from 'react';
import * as React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import LocaleReceiver from '../locale-provider/LocaleReceiver';
@ -48,7 +48,7 @@ export interface ListProps {
locale?: Object;
}
export default class List extends Component<ListProps> {
export default class List extends React.Component<ListProps> {
static Item: typeof Item = Item;
static childContextTypes = {

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import PropTypes from 'prop-types';
export interface LocaleReceiverProps {

View File

@ -1,4 +1,4 @@
import moment from 'moment';
import * as moment from 'moment';
moment.locale('ar');
import Pagination from 'rc-pagination/lib/locale/ar_EG';

View File

@ -1,4 +1,4 @@
import moment from 'moment';
import * as moment from 'moment';
moment.locale('bg');
import Pagination from 'rc-pagination/lib/locale/bg_BG';

View File

@ -1,4 +1,4 @@
import moment from 'moment';
import * as moment from 'moment';
moment.locale('ca');
import Pagination from 'rc-pagination/lib/locale/ca_ES';

View File

@ -1,4 +1,4 @@
import moment from 'moment';
import * as moment from 'moment';
moment.locale('cs');
import Pagination from 'rc-pagination/lib/locale/cs_CZ';

View File

@ -1,4 +1,4 @@
import moment from 'moment';
import * as moment from 'moment';
moment.locale('de');
import Pagination from 'rc-pagination/lib/locale/de_DE';

View File

@ -1,4 +1,4 @@
import moment from 'moment';
import * as moment from 'moment';
moment.locale('el');
import Pagination from 'rc-pagination/lib/locale/el_GR';

View File

@ -1,4 +1,4 @@
import moment from 'moment';
import * as moment from 'moment';
moment.locale('en-gb');
import Pagination from 'rc-pagination/lib/locale/en_GB';

View File

@ -1,5 +1,5 @@
import defaultLocale from './default';
import moment from 'moment';
import * as moment from 'moment';
moment.locale('en');
export default defaultLocale;

View File

@ -1,4 +1,4 @@
import moment from 'moment';
import * as moment from 'moment';
moment.locale('et');
import Pagination from 'rc-pagination/lib/locale/et_EE';

View File

@ -1,4 +1,4 @@
import moment from 'moment';
import * as moment from 'moment';
moment.locale('fa');
import Pagination from 'rc-pagination/lib/locale/fa_IR';

View File

@ -1,4 +1,4 @@
import moment from 'moment';
import * as moment from 'moment';
moment.locale('fi');
import Pagination from 'rc-pagination/lib/locale/fi_FI';

View File

@ -1,4 +1,4 @@
import moment from 'moment';
import * as moment from 'moment';
moment.locale('fr');
import Pagination from 'rc-pagination/lib/locale/fr_BE';

View File

@ -1,4 +1,4 @@
import moment from 'moment';
import * as moment from 'moment';
moment.locale('fr');
import Pagination from 'rc-pagination/lib/locale/fr_FR';

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import PropTypes from 'prop-types';
import { ModalLocale, changeConfirmLocale } from '../modal/locale';

View File

@ -1,4 +1,4 @@
import moment from 'moment';
import * as moment from 'moment';
moment.locale('is');
import Pagination from 'rc-pagination/lib/locale/is_IS';

View File

@ -1,4 +1,4 @@
import moment from 'moment';
import * as moment from 'moment';
moment.locale('it');
import Pagination from 'rc-pagination/lib/locale/it_IT';

View File

@ -1,4 +1,4 @@
import moment from 'moment';
import * as moment from 'moment';
moment.locale('ja');
import Pagination from 'rc-pagination/lib/locale/ja_JP';

View File

@ -1,4 +1,4 @@
import moment from 'moment';
import * as moment from 'moment';
moment.locale('ko');
import Pagination from 'rc-pagination/lib/locale/ko_KR';

View File

@ -1,4 +1,4 @@
import moment from 'moment';
import * as moment from 'moment';
moment.locale('nb');
import Pagination from 'rc-pagination/lib/locale/nb_NO';

View File

@ -1,4 +1,4 @@
import moment from 'moment';
import * as moment from 'moment';
moment.locale('nl-be');
import Pagination from 'rc-pagination/lib/locale/nl_BE';

View File

@ -1,4 +1,4 @@
import moment from 'moment';
import * as moment from 'moment';
moment.locale('nl');
import Pagination from 'rc-pagination/lib/locale/nl_NL';

View File

@ -1,4 +1,4 @@
import moment from 'moment';
import * as moment from 'moment';
moment.locale('pl');
import Pagination from 'rc-pagination/lib/locale/pl_PL';

View File

@ -1,4 +1,4 @@
import moment from 'moment';
import * as moment from 'moment';
moment.locale('pt-br');
import Pagination from 'rc-pagination/lib/locale/pt_BR';

View File

@ -1,4 +1,4 @@
import moment from 'moment';
import * as moment from 'moment';
moment.locale('pt');
import Pagination from 'rc-pagination/lib/locale/pt_PT';

View File

@ -2,7 +2,7 @@
* Created by Andrey Gayvoronsky on 13/04/16.
*/
import moment from 'moment';
import * as moment from 'moment';
moment.locale('ru');
import Pagination from 'rc-pagination/lib/locale/ru_RU';

View File

@ -1,4 +1,4 @@
import moment from 'moment';
import * as moment from 'moment';
moment.locale('sk');
import Pagination from 'rc-pagination/lib/locale/sk_SK';

View File

@ -1,4 +1,4 @@
import moment from 'moment';
import * as moment from 'moment';
moment.locale('sr');
import Pagination from 'rc-pagination/lib/locale/sr_RS';

View File

@ -1,4 +1,4 @@
import moment from 'moment';
import * as moment from 'moment';
moment.locale('sv');
import Pagination from 'rc-pagination/lib/locale/sv_SE';

View File

@ -1,4 +1,4 @@
import moment from 'moment';
import * as moment from 'moment';
moment.locale('th');
import Pagination from 'rc-pagination/lib/locale/th_TH';

View File

@ -1,4 +1,4 @@
import moment from 'moment';
import * as moment from 'moment';
moment.locale('tr');
import Pagination from 'rc-pagination/lib/locale/en_US';

View File

@ -1,4 +1,4 @@
import moment from 'moment';
import * as moment from 'moment';
moment.locale('uk');
import Pagination from 'rc-pagination/lib/locale/uk_UA';

View File

@ -1,4 +1,4 @@
import moment from 'moment';
import * as moment from 'moment';
moment.locale('vi');
import Pagination from 'rc-pagination/lib/locale/vi_VN';

View File

@ -1,4 +1,4 @@
import moment from 'moment';
import * as moment from 'moment';
moment.locale('zh-cn');
import Pagination from 'rc-pagination/lib/locale/zh_CN';

View File

@ -1,4 +1,4 @@
import moment from 'moment';
import * as moment from 'moment';
moment.locale('zh-tw');
import Pagination from 'rc-pagination/lib/locale/zh_TW';

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import RcMention, { Nav, toString, toEditorState, getMentions } from 'rc-editor-mention';
import classNames from 'classnames';
import shallowequal from 'shallowequal';

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { Item } from 'rc-menu';
import PropTypes from 'prop-types';
import Tooltip from '../tooltip';

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import PropTypes from 'prop-types';
import { SubMenu as RcSubMenu } from 'rc-menu';
import classNames from 'classnames';

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import RcMenu, { Divider, ItemGroup } from 'rc-menu';
import PropTypes from 'prop-types';
import classNames from 'classnames';

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import Notification from 'rc-notification';
import Icon from '../icon';

View File

@ -1,5 +1,5 @@
import React from 'react';
import ReactDOM from 'react-dom';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import Button from '../button';
import { ButtonType } from '../button/button';

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import Dialog from 'rc-dialog';
import PropTypes from 'prop-types';
import addEventListener from 'rc-util/lib/Dom/addEventListener';

View File

@ -1,5 +1,5 @@
import React from 'react';
import ReactDOM from 'react-dom';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import classNames from 'classnames';
import Icon from '../icon';
import Dialog from './Modal';

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import Notification from 'rc-notification';
import Icon from '../icon';

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import Select, { OptionProps } from '../select';
export default class MiniSelect extends React.Component<any, any> {

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import RcPagination from 'rc-pagination';
import enUS from 'rc-pagination/lib/locale/en_US';
import classNames from 'classnames';

View File

@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import Tooltip, { AbstractTooltipProps } from '../tooltip';
import Icon from '../icon';
import Button from '../button';

Some files were not shown because too many files have changed in this diff Show More