mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-23 18:50:06 +08:00
Remove allowSyntheticDefaultImports (#8218)
This commit is contained in:
parent
fdf0c11ec7
commit
479a5cb743
5
.jest.js
5
.jest.js
@ -42,4 +42,9 @@ module.exports = {
|
||||
snapshotSerializers: [
|
||||
'enzyme-to-json/serializer',
|
||||
],
|
||||
globals: {
|
||||
'ts-jest': {
|
||||
tsConfigFile: './tsconfig.test.json',
|
||||
}
|
||||
},
|
||||
};
|
||||
|
@ -18,4 +18,9 @@ module.exports = {
|
||||
snapshotSerializers: [
|
||||
'enzyme-to-json/serializer'
|
||||
],
|
||||
globals: {
|
||||
'ts-jest': {
|
||||
tsConfigFile: './tsconfig.test.json',
|
||||
}
|
||||
},
|
||||
};
|
||||
|
@ -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 定义。
|
||||
|
||||
## 国际化
|
||||
|
||||
|
15
README.md
15
README.md
@ -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
|
||||
|
||||
|
5
components/_util/callMoment.tsx
Normal file
5
components/_util/callMoment.tsx
Normal file
@ -0,0 +1,5 @@
|
||||
// https://github.com/moment/moment/issues/3650
|
||||
|
||||
export default function callMoment(moment, ...args) {
|
||||
return (moment.default || moment)(...args);
|
||||
}
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React from 'react';
|
||||
import * as React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import classNames from 'classnames';
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React from 'react';
|
||||
import * as React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
export interface BreadcrumbItemProps {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React from 'react';
|
||||
import * as React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import { ButtonSize } from './button';
|
||||
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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`, ' +
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React from 'react';
|
||||
import * as React from 'react';
|
||||
import classNames from 'classnames';
|
||||
|
||||
export interface CardGridProps {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React from 'react';
|
||||
import * as React from 'react';
|
||||
import classNames from 'classnames';
|
||||
|
||||
export interface CardMetaProps {
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React from 'react';
|
||||
import * as React from 'react';
|
||||
import debounce from 'lodash.debounce';
|
||||
|
||||
// matchMedia polyfill for
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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: [],
|
||||
};
|
||||
|
@ -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,
|
||||
|
@ -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}
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React from 'react';
|
||||
import * as React from 'react';
|
||||
import classNames from 'classnames';
|
||||
|
||||
export default function Divider({
|
||||
|
@ -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';
|
||||
|
@ -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,
|
||||
});
|
||||
|
@ -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';
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React from 'react';
|
||||
import * as React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import classNames from 'classnames';
|
||||
|
||||
|
@ -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';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React from 'react';
|
||||
import * as React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import omit from 'omit.js';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React from 'react';
|
||||
import * as React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import RcInputNumber from 'rc-input-number';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React from 'react';
|
||||
import * as React from 'react';
|
||||
import classNames from 'classnames';
|
||||
|
||||
export interface GroupProps {
|
||||
|
@ -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>
|
||||
);
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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 = {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React from 'react';
|
||||
import * as React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
export interface LocaleReceiverProps {
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import defaultLocale from './default';
|
||||
import moment from 'moment';
|
||||
import * as moment from 'moment';
|
||||
moment.locale('en');
|
||||
|
||||
export default defaultLocale;
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React from 'react';
|
||||
import * as React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { ModalLocale, changeConfirmLocale } from '../modal/locale';
|
||||
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React from 'react';
|
||||
import * as React from 'react';
|
||||
import Notification from 'rc-notification';
|
||||
import Icon from '../icon';
|
||||
|
||||
|
@ -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';
|
||||
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React from 'react';
|
||||
import * as React from 'react';
|
||||
import Notification from 'rc-notification';
|
||||
import Icon from '../icon';
|
||||
|
||||
|
@ -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> {
|
||||
|
@ -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';
|
||||
|
@ -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
Loading…
Reference in New Issue
Block a user