设置 allowSyntheticDefaultImports

This commit is contained in:
liaoxuezhi 2019-06-10 22:53:21 +08:00
parent 4669d5fb0a
commit 3af11ec2f1
147 changed files with 282 additions and 278 deletions

View File

@ -60,6 +60,7 @@ fis.match('/docs/**.md', {
fis.match('{*.jsx,*.tsx,/src/**.js,/src/**.ts}', { fis.match('{*.jsx,*.tsx,/src/**.js,/src/**.ts}', {
parser: [fis.plugin('typescript', { parser: [fis.plugin('typescript', {
importHelpers: true, importHelpers: true,
esModuleInterop: true,
experimentalDecorators: true, experimentalDecorators: true,
sourceMap: true sourceMap: true
}), }),
@ -160,7 +161,8 @@ if (fis.project.currentMedia() === 'publish') {
fis.plugin('typescript', { fis.plugin('typescript', {
importHelpers: true, importHelpers: true,
sourceMap: true, sourceMap: true,
experimentalDecorators: true experimentalDecorators: true,
esModuleInterop: true
}), }),
function (contents) { function (contents) {
return contents.replace(/(?:\w+\.)?\b__uri\s*\(\s*('|")(.*?)\1\s*\)/g, function (_, quote, value) { return contents.replace(/(?:\w+\.)?\b__uri\s*\(\s*('|")(.*?)\1\s*\)/g, function (_, quote, value) {
@ -394,7 +396,8 @@ if (fis.project.currentMedia() === 'publish') {
}, },
parser: fis.plugin('typescript', { parser: fis.plugin('typescript', {
sourceMap: false, sourceMap: false,
importHelpers: true importHelpers: true,
esModuleInterop: true
}) })
}); });
ghPages.match('*', { ghPages.match('*', {

View File

@ -70,7 +70,7 @@
"redux": "3.7.2", "redux": "3.7.2",
"setimmediate": "1.0.5", "setimmediate": "1.0.5",
"sortablejs": "1.7.0", "sortablejs": "1.7.0",
"tslib": "1.8.0", "tslib": "^1.9.3",
"uncontrollable": "4.1.0", "uncontrollable": "4.1.0",
"video-react": "0.9.4" "video-react": "0.9.4"
}, },

View File

@ -3,11 +3,11 @@
* @author fex * @author fex
*/ */
import * as React from 'react'; import React from 'react';
import find = require('lodash/find'); import find = require('lodash/find');
import * as PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import hoistNonReactStatic = require('hoist-non-react-statics'); import hoistNonReactStatic = require('hoist-non-react-statics');
import * as qs from 'qs'; import qs from 'qs';
import { dataMapping } from './utils/tpl-builtin'; import { dataMapping } from './utils/tpl-builtin';
import { RendererEnv, RendererProps } from './factory'; import { RendererEnv, RendererProps } from './factory';
import { noop, autobind } from './utils/helper'; import { noop, autobind } from './utils/helper';

View File

@ -3,7 +3,7 @@
* @author fex * @author fex
*/ */
import * as React from 'react'; import React from 'react';
import {themeable, ClassNamesFn} from '../theme'; import {themeable, ClassNamesFn} from '../theme';
interface NotFoundProps { interface NotFoundProps {

View File

@ -3,7 +3,7 @@
* @author fex * @author fex
*/ */
import * as React from 'react'; import React from 'react';
import {render} from 'react-dom'; import {render} from 'react-dom';
import Modal from './Modal'; import Modal from './Modal';
import Button from './Button'; import Button from './Button';

View File

@ -3,7 +3,7 @@
* @author fex * @author fex
*/ */
import * as React from 'react'; import React from 'react';
import {ClassNamesFn, themeable} from '../theme'; import {ClassNamesFn, themeable} from '../theme';
export interface AlertProps { export interface AlertProps {

View File

@ -4,8 +4,8 @@
* @author fex * @author fex
*/ */
import * as React from 'react'; import React from 'react';
import * as cx from 'classnames'; import cx from 'classnames';
import {mapTree} from '../utils/helper'; import {mapTree} from '../utils/helper';
import {classPrefix, classnames} from '../themes/default'; import {classPrefix, classnames} from '../themes/default';
import {ClassNamesFn, themeable} from '../theme'; import {ClassNamesFn, themeable} from '../theme';

View File

@ -3,7 +3,7 @@
* @author fex * @author fex
*/ */
import * as React from 'react'; import React from 'react';
import TooltipWrapper, {TooltipObject, Trigger} from './TooltipWrapper'; import TooltipWrapper, {TooltipObject, Trigger} from './TooltipWrapper';
import {pickEventsProps} from '../utils/helper'; import {pickEventsProps} from '../utils/helper';
import {ClassNamesFn, themeable} from '../theme'; import {ClassNamesFn, themeable} from '../theme';

View File

@ -3,8 +3,8 @@
* @author fex * @author fex
*/ */
import * as React from 'react'; import React from 'react';
import * as cx from 'classnames'; import cx from 'classnames';
import {ClassNamesFn, themeable} from '../theme'; import {ClassNamesFn, themeable} from '../theme';
import {autobind} from '../utils/helper'; import {autobind} from '../utils/helper';

View File

@ -4,7 +4,7 @@
* @author fex * @author fex
*/ */
import * as React from 'react'; import React from 'react';
import uncontrollable = require('uncontrollable'); import uncontrollable = require('uncontrollable');
import Checkbox from './Checkbox'; import Checkbox from './Checkbox';
import find = require('lodash/find'); import find = require('lodash/find');

View File

@ -4,8 +4,8 @@
* @author fex * @author fex
*/ */
import * as React from 'react'; import React from 'react';
import * as cx from 'classnames'; import cx from 'classnames';
import {findDOMNode} from 'react-dom'; import {findDOMNode} from 'react-dom';
import {SketchPicker, ColorResult} from 'react-color'; import {SketchPicker, ColorResult} from 'react-color';
import {closeIcon} from './icons'; import {closeIcon} from './icons';

View File

@ -4,14 +4,14 @@
* @author fex * @author fex
*/ */
import * as React from 'react'; import React from 'react';
import * as cx from 'classnames'; import cx from 'classnames';
import * as moment from 'moment'; import moment from 'moment';
import 'moment/locale/zh-cn'; import 'moment/locale/zh-cn';
// hack 进去,让 days view 用 CustomDaysView 代替 // hack 进去,让 days view 用 CustomDaysView 代替
import * as CalendarContainer from 'react-datetime/src/CalendarContainer'; import CalendarContainer from 'react-datetime/src/CalendarContainer';
import * as ReactDatePicker from 'react-datetime'; import ReactDatePicker from 'react-datetime';
import Select from './Select'; import Select from './Select';
import {closeIcon} from './icons'; import {closeIcon} from './icons';
import PopOver from './PopOver'; import PopOver from './PopOver';

View File

@ -7,7 +7,7 @@
import React = require('react'); import React = require('react');
import moment = require('moment'); import moment = require('moment');
import {findDOMNode} from 'react-dom'; import {findDOMNode} from 'react-dom';
import * as cx from 'classnames'; import cx from 'classnames';
import {closeIcon} from './icons'; import {closeIcon} from './icons';
import Overlay from './Overlay'; import Overlay from './Overlay';
import {BaseDatePicker} from './DatePicker'; import {BaseDatePicker} from './DatePicker';

View File

@ -4,11 +4,11 @@
* @author fex * @author fex
*/ */
import * as React from 'react'; import React from 'react';
import Transition, {ENTERED, ENTERING, EXITING} from 'react-transition-group/Transition'; import Transition, {ENTERED, ENTERING, EXITING} from 'react-transition-group/Transition';
import {Portal} from 'react-overlays'; import {Portal} from 'react-overlays';
import {closeIcon} from './icons'; import {closeIcon} from './icons';
import * as cx from 'classnames'; import cx from 'classnames';
import {current, addModal, removeModal} from './ModalManager'; import {current, addModal, removeModal} from './ModalManager';
import {ClassNamesFn, themeable} from '../theme'; import {ClassNamesFn, themeable} from '../theme';
import {noop, autobind} from '../utils/helper'; import {noop, autobind} from '../utils/helper';

View File

@ -4,8 +4,8 @@
* @author fex * @author fex
*/ */
import * as React from 'react'; import React from 'react';
import * as cx from 'classnames'; import cx from 'classnames';
import {ClassNamesFn, themeable} from '../theme'; import {ClassNamesFn, themeable} from '../theme';
function noJsExt(raw: string) { function noJsExt(raw: string) {

View File

@ -4,8 +4,8 @@
* @author fex * @author fex
*/ */
import * as React from 'react'; import React from 'react';
import * as cx from 'classnames'; import cx from 'classnames';
import {classPrefix, classnames} from '../themes/default'; import {classPrefix, classnames} from '../themes/default';
import {ClassNamesFn, themeable} from '../theme'; import {ClassNamesFn, themeable} from '../theme';

View File

@ -16,8 +16,8 @@
* * contentClassName * * contentClassName
*/ */
import * as React from 'react'; import React from 'react';
import * as cx from 'classnames'; import cx from 'classnames';
import {ClassNamesFn, themeable} from '../theme'; import {ClassNamesFn, themeable} from '../theme';
interface LayoutProps { interface LayoutProps {

View File

@ -4,7 +4,7 @@
* @author fex * @author fex
*/ */
import * as React from 'react'; import React from 'react';
import VisibilitySensor = require('react-visibility-sensor'); import VisibilitySensor = require('react-visibility-sensor');
export interface LazyComponentProps { export interface LazyComponentProps {

View File

@ -4,10 +4,10 @@
* @author fex * @author fex
*/ */
import * as React from 'react'; import React from 'react';
import Transition, {ENTERED, ENTERING} from 'react-transition-group/Transition'; import Transition, {ENTERED, ENTERING} from 'react-transition-group/Transition';
import {Portal} from 'react-overlays'; import {Portal} from 'react-overlays';
import * as cx from 'classnames'; import cx from 'classnames';
import {current, addModal, removeModal} from './ModalManager'; import {current, addModal, removeModal} from './ModalManager';
import {ClassNamesFn, themeable} from '../theme'; import {ClassNamesFn, themeable} from '../theme';

View File

@ -4,7 +4,7 @@
* @author fex * @author fex
*/ */
import * as keycode from 'keycode'; import keycode from 'keycode';
interface ModalComponent interface ModalComponent
extends React.Component<{ extends React.Component<{

View File

@ -6,7 +6,7 @@
import {Position, Overlay as BaseOverlay} from 'react-overlays'; import {Position, Overlay as BaseOverlay} from 'react-overlays';
import {findDOMNode} from 'react-dom'; import {findDOMNode} from 'react-dom';
import * as React from 'react'; import React from 'react';
import {calculatePosition, getContainer, ownerDocument} from '../utils/dom'; import {calculatePosition, getContainer, ownerDocument} from '../utils/dom';
Position.propTypes.placement = BaseOverlay.propTypes.placement = () => null; Position.propTypes.placement = BaseOverlay.propTypes.placement = () => null;

View File

@ -4,7 +4,7 @@
* @author fex * @author fex
*/ */
import * as React from 'react'; import React from 'react';
import {findDOMNode} from 'react-dom'; import {findDOMNode} from 'react-dom';
import {ClassNamesFn, themeable} from '../theme'; import {ClassNamesFn, themeable} from '../theme';

View File

@ -13,7 +13,7 @@
* ] * ]
*/ */
import * as React from 'react'; import React from 'react';
import uncontrollable = require('uncontrollable'); import uncontrollable = require('uncontrollable');
import Checkbox from './Checkbox'; import Checkbox from './Checkbox';
import {value2array, OptionProps, Option} from './Checkboxes'; import {value2array, OptionProps, Option} from './Checkboxes';

View File

@ -4,10 +4,10 @@
* @author fex * @author fex
*/ */
import * as React from 'react'; import React from 'react';
import * as InputRange from 'react-input-range'; import InputRange from 'react-input-range';
import uncontrollable = require('uncontrollable'); import uncontrollable = require('uncontrollable');
import * as cx from 'classnames'; import cx from 'classnames';
import {RendererProps} from '../factory'; import {RendererProps} from '../factory';
import {ClassNamesFn, themeable} from '../theme'; import {ClassNamesFn, themeable} from '../theme';

View File

@ -4,8 +4,8 @@
* @author fex * @author fex
*/ */
import * as React from 'react'; import React from 'react';
import * as cx from 'classnames'; import cx from 'classnames';
import {ClassNamesFn, themeable} from '../theme'; import {ClassNamesFn, themeable} from '../theme';
interface RatingProps { interface RatingProps {

View File

@ -4,8 +4,8 @@
* @author fex * @author fex
*/ */
import * as React from 'react'; import React from 'react';
import * as $ from 'jquery'; import $ from 'jquery';
// Require Editor JS files. // Require Editor JS files.
// import 'froala-editor/js/froala_editor.pkgd.min.js'; // import 'froala-editor/js/froala_editor.pkgd.min.js';

View File

@ -6,14 +6,14 @@
*/ */
import uncontrollable = require('uncontrollable'); import uncontrollable = require('uncontrollable');
import * as React from 'react'; import React from 'react';
import 'react-datetime/css/react-datetime.css'; import 'react-datetime/css/react-datetime.css';
import Overlay from './Overlay'; import Overlay from './Overlay';
import PopOver from './PopOver'; import PopOver from './PopOver';
import Downshift, {ControllerStateAndHelpers} from 'downshift'; import Downshift, {ControllerStateAndHelpers} from 'downshift';
import * as cx from 'classnames'; import cx from 'classnames';
import {closeIcon} from './icons'; import {closeIcon} from './icons';
import * as matchSorter from 'match-sorter'; import matchSorter from 'match-sorter';
import {noop} from '../utils/helper'; import {noop} from '../utils/helper';
import find = require('lodash/find'); import find = require('lodash/find');
import isPlainObject = require('lodash/isPlainObject'); import isPlainObject = require('lodash/isPlainObject');

View File

@ -5,7 +5,7 @@
* @date 2017-11-07 * @date 2017-11-07
*/ */
import * as React from 'react'; import React from 'react';
import {Renderer, RendererProps} from '../factory'; import {Renderer, RendererProps} from '../factory';
import {ClassNamesFn, themeable} from '../theme'; import {ClassNamesFn, themeable} from '../theme';
import {classPrefix, classnames} from '../themes/default'; import {classPrefix, classnames} from '../themes/default';

View File

@ -4,8 +4,8 @@
* @author fex * @author fex
*/ */
import * as React from 'react'; import React from 'react';
import * as cx from 'classnames'; import cx from 'classnames';
import {ClassNamesFn, themeable} from '../theme'; import {ClassNamesFn, themeable} from '../theme';
import {classPrefix, classnames} from '../themes/default'; import {classPrefix, classnames} from '../themes/default';

View File

@ -1,2 +1,2 @@
import * as Textarea from 'react-textarea-autosize'; import Textarea from 'react-textarea-autosize';
export default Textarea; export default Textarea;

View File

@ -8,7 +8,7 @@
* right , hbox * right , hbox
*/ */
import * as React from 'react'; import React from 'react';
import {classPrefix, classnames} from '../themes/default'; import {classPrefix, classnames} from '../themes/default';
import {ClassNamesFn, themeable} from '../theme'; import {ClassNamesFn, themeable} from '../theme';

View File

@ -5,8 +5,8 @@
*/ */
import Transition, {ENTERED, ENTERING, EXITING, EXITED} from 'react-transition-group/Transition'; import Transition, {ENTERED, ENTERING, EXITING, EXITED} from 'react-transition-group/Transition';
import * as React from 'react'; import React from 'react';
import * as cx from 'classnames'; import cx from 'classnames';
import Html from './Html'; import Html from './Html';
import {uuid, autobind} from '../utils/helper'; import {uuid, autobind} from '../utils/helper';
import {ClassNamesFn, themeable} from '../theme'; import {ClassNamesFn, themeable} from '../theme';

View File

@ -4,8 +4,8 @@
* @author fex * @author fex
*/ */
import * as React from 'react'; import React from 'react';
import * as cx from 'classnames'; import cx from 'classnames';
import {classPrefix, classnames} from '../themes/default'; import {classPrefix, classnames} from '../themes/default';
import {ClassNamesFn, themeable} from '../theme'; import {ClassNamesFn, themeable} from '../theme';

View File

@ -4,7 +4,7 @@
* @author fex * @author fex
*/ */
import * as React from 'react'; import React from 'react';
import {eachTree, isVisible} from '../utils/helper'; import {eachTree, isVisible} from '../utils/helper';
import {Option, Options, value2array} from './Checkboxes'; import {Option, Options, value2array} from './Checkboxes';
import {ClassNamesFn, themeable} from '../theme'; import {ClassNamesFn, themeable} from '../theme';

View File

@ -4,7 +4,7 @@
* @author fex * @author fex
*/ */
import * as React from 'react'; import React from 'react';
export const closeIcon = ( export const closeIcon = (
<svg className="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1463"> <svg className="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1463">
<path <path

View File

@ -18,7 +18,7 @@ import Drawer from './Drawer';
import DropdownButton from './DropdownButton'; import DropdownButton from './DropdownButton';
// import Editor from './Editor'; // import Editor from './Editor';
import Html from './Html'; import Html from './Html';
import * as Icons from './icons'; import Icons from './icons';
import Layout from './Layout'; import Layout from './Layout';
import LazyComponent from './LazyComponent'; import LazyComponent from './LazyComponent';
import Modal from './Modal'; import Modal from './Modal';

View File

@ -1,5 +1,5 @@
import * as React from "react"; import React from "react";
import * as qs from 'qs'; import qs from 'qs';
import { import {
RendererStore, RendererStore,
IRendererStore, IRendererStore,

View File

@ -8,7 +8,7 @@ import {wrapFetcher, buildApi} from './utils/api';
import {filter, reigsterTplEnginer} from './utils/tpl' import {filter, reigsterTplEnginer} from './utils/tpl'
import './utils/tpl-builtin'; import './utils/tpl-builtin';
import './utils/tpl-lodash'; import './utils/tpl-lodash';
import * as utils from './utils/helper'; import utils from './utils/helper';
import {resizeSensor} from './utils/resize-sensor'; import {resizeSensor} from './utils/resize-sensor';
import {setIconVendor} from './renderers/Form/IconPicker-icons'; import {setIconVendor} from './renderers/Form/IconPicker-icons';

View File

@ -1,4 +1,4 @@
import * as React from 'react'; import React from 'react';
import {Renderer, RendererProps} from '../factory'; import {Renderer, RendererProps} from '../factory';
import {filter} from '../utils/tpl'; import {filter} from '../utils/tpl';
import Button from '../components/Button'; import Button from '../components/Button';

View File

@ -1,4 +1,4 @@
import * as React from 'react'; import React from 'react';
import upperFirst = require('lodash/upperFirst'); import upperFirst = require('lodash/upperFirst');
import {Renderer, RendererProps} from '../factory'; import {Renderer, RendererProps} from '../factory';
import {autobind} from '../utils/helper'; import {autobind} from '../utils/helper';

View File

@ -1,4 +1,4 @@
import * as React from 'react'; import React from 'react';
import ButtonGroup from './Form/ButtonGroup'; import ButtonGroup from './Form/ButtonGroup';
import {Renderer} from '../factory'; import {Renderer} from '../factory';

View File

@ -1,4 +1,4 @@
import * as React from 'react'; import React from 'react';
import {Renderer, RendererProps} from '../factory'; import {Renderer, RendererProps} from '../factory';
import {Action} from '../types'; import {Action} from '../types';

View File

@ -1,5 +1,5 @@
import * as React from 'react'; import React from 'react';
import * as PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import {Renderer, RendererProps} from '../factory'; import {Renderer, RendererProps} from '../factory';
import {SchemaNode, Schema, Action, Api, ApiObject} from '../types'; import {SchemaNode, Schema, Action, Api, ApiObject} from '../types';
import {CRUDStore, ICRUDStore} from '../store/crud'; import {CRUDStore, ICRUDStore} from '../store/crud';
@ -19,7 +19,7 @@ import Button from '../components/Button';
import Select from '../components/Select'; import Select from '../components/Select';
import getExprProperties from '../utils/filter-schema'; import getExprProperties from '../utils/filter-schema';
import pick = require('lodash/pick'); import pick = require('lodash/pick');
import * as qs from 'qs'; import qs from 'qs';
import {findDOMNode} from 'react-dom'; import {findDOMNode} from 'react-dom';
import {evalExpression, filter} from '../utils/tpl'; import {evalExpression, filter} from '../utils/tpl';
import {isValidApi, buildApi} from '../utils/api'; import {isValidApi, buildApi} from '../utils/api';

View File

@ -1,9 +1,9 @@
import * as React from 'react'; import React from 'react';
import {findDOMNode} from 'react-dom'; import {findDOMNode} from 'react-dom';
import {Renderer, RendererProps} from '../factory'; import {Renderer, RendererProps} from '../factory';
import {SchemaNode, Schema, Action} from '../types'; import {SchemaNode, Schema, Action} from '../types';
import {filter, evalExpression} from '../utils/tpl'; import {filter, evalExpression} from '../utils/tpl';
import * as cx from 'classnames'; import cx from 'classnames';
import Checkbox from '../components/Checkbox'; import Checkbox from '../components/Checkbox';
import {IItem} from '../store/list'; import {IItem} from '../store/list';
import {padArr, isVisible, isDisabled, noop} from '../utils/helper'; import {padArr, isVisible, isDisabled, noop} from '../utils/helper';

View File

@ -1,8 +1,8 @@
import * as React from 'react'; import React from 'react';
import {findDOMNode} from 'react-dom'; import {findDOMNode} from 'react-dom';
import {Renderer, RendererProps} from '../factory'; import {Renderer, RendererProps} from '../factory';
import {SchemaNode, Action} from '../types'; import {SchemaNode, Action} from '../types';
import * as cx from 'classnames'; import cx from 'classnames';
import Button from '../components/Button'; import Button from '../components/Button';
import {ListStore, IListStore, IItem} from '../store/list'; import {ListStore, IListStore, IItem} from '../store/list';
import {observer} from 'mobx-react'; import {observer} from 'mobx-react';

View File

@ -1,4 +1,4 @@
import * as React from 'react'; import React from 'react';
import Transition, {ENTERED, ENTERING, EXITING} from 'react-transition-group/Transition'; import Transition, {ENTERED, ENTERING, EXITING} from 'react-transition-group/Transition';
import {Renderer, RendererProps} from '../factory'; import {Renderer, RendererProps} from '../factory';
import {autobind, createObject} from '../utils/helper'; import {autobind, createObject} from '../utils/helper';

View File

@ -1,10 +1,10 @@
import * as React from 'react'; import React from 'react';
import * as PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import {Renderer, RendererProps} from '../factory'; import {Renderer, RendererProps} from '../factory';
import {ServiceStore, IServiceStore} from '../store/service'; import {ServiceStore, IServiceStore} from '../store/service';
import {Api, ApiObject, Action} from '../types'; import {Api, ApiObject, Action} from '../types';
import {filter, evalExpression} from '../utils/tpl'; import {filter, evalExpression} from '../utils/tpl';
import * as cx from 'classnames'; import cx from 'classnames';
import LazyComponent from '../components/LazyComponent'; import LazyComponent from '../components/LazyComponent';
import {resizeSensor} from '../utils/resize-sensor'; import {resizeSensor} from '../utils/resize-sensor';
import {resolveVariableAndFilter} from '../utils/tpl-builtin'; import {resolveVariableAndFilter} from '../utils/tpl-builtin';

View File

@ -1,6 +1,6 @@
import * as React from 'react'; import React from 'react';
import {Renderer, RendererProps} from '../factory'; import {Renderer, RendererProps} from '../factory';
import * as cx from 'classnames'; import cx from 'classnames';
import {Collapse as BasicCollapse} from 'react-bootstrap'; import {Collapse as BasicCollapse} from 'react-bootstrap';
export interface CollapseProps extends RendererProps { export interface CollapseProps extends RendererProps {

View File

@ -1,4 +1,4 @@
import * as React from 'react'; import React from 'react';
import {Renderer, RendererProps} from '../factory'; import {Renderer, RendererProps} from '../factory';
import {SchemaNode} from '../types'; import {SchemaNode} from '../types';

View File

@ -3,9 +3,9 @@
* @author fex * @author fex
*/ */
import * as React from 'react'; import React from 'react';
import {RendererProps} from '../factory'; import {RendererProps} from '../factory';
import * as cx from 'classnames'; import cx from 'classnames';
import hoistNonReactStatic = require('hoist-non-react-statics'); import hoistNonReactStatic = require('hoist-non-react-statics');
import Button from '../components/Button'; import Button from '../components/Button';
import {filter} from '../utils/tpl'; import {filter} from '../utils/tpl';

View File

@ -1,10 +1,10 @@
import * as React from 'react'; import React from 'react';
import {Renderer, RendererProps} from '../factory'; import {Renderer, RendererProps} from '../factory';
import {ServiceStore, IServiceStore} from '../store/service'; import {ServiceStore, IServiceStore} from '../store/service';
import {Api, SchemaNode} from '../types'; import {Api, SchemaNode} from '../types';
import {filter} from '../utils/tpl'; import {filter} from '../utils/tpl';
import * as cx from 'classnames'; import cx from 'classnames';
import * as moment from 'moment'; import moment from 'moment';
export interface DateProps extends RendererProps { export interface DateProps extends RendererProps {
className?: string; className?: string;

View File

@ -1,5 +1,5 @@
import * as React from 'react'; import React from 'react';
import * as PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import Scoped, {ScopedContext, IScopedContext} from '../Scoped'; import Scoped, {ScopedContext, IScopedContext} from '../Scoped';
import {Renderer, RendererProps} from '../factory'; import {Renderer, RendererProps} from '../factory';
import {ServiceStore, IServiceStore} from '../store/service'; import {ServiceStore, IServiceStore} from '../store/service';

View File

@ -1,8 +1,8 @@
import * as React from 'react'; import React from 'react';
import {Renderer, RendererProps} from '../factory'; import {Renderer, RendererProps} from '../factory';
import {ServiceStore, IServiceStore} from '../store/service'; import {ServiceStore, IServiceStore} from '../store/service';
import {filter} from '../utils/tpl'; import {filter} from '../utils/tpl';
import * as cx from 'classnames'; import cx from 'classnames';
export interface DividerProps extends RendererProps {} export interface DividerProps extends RendererProps {}

View File

@ -1,11 +1,11 @@
import * as React from 'react'; import React from 'react';
import * as PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import Scoped, {ScopedContext, IScopedContext} from '../Scoped'; import Scoped, {ScopedContext, IScopedContext} from '../Scoped';
import {Renderer, RendererProps} from '../factory'; import {Renderer, RendererProps} from '../factory';
import {ServiceStore, IServiceStore} from '../store/service'; import {ServiceStore, IServiceStore} from '../store/service';
import {observer} from 'mobx-react'; import {observer} from 'mobx-react';
import {SchemaNode, Schema, Action} from '../types'; import {SchemaNode, Schema, Action} from '../types';
import * as cx from 'classnames'; import cx from 'classnames';
import {default as DrawerContainer} from '../components/Drawer'; import {default as DrawerContainer} from '../components/Drawer';
import findLast = require('lodash/findLast'); import findLast = require('lodash/findLast');
import {guid} from '../utils/helper'; import {guid} from '../utils/helper';

View File

@ -1,9 +1,9 @@
import * as React from 'react'; import React from 'react';
import {Renderer, RendererProps} from '../factory'; import {Renderer, RendererProps} from '../factory';
import {RootCloseWrapper} from 'react-overlays'; import {RootCloseWrapper} from 'react-overlays';
import Overlay from '../components/Overlay'; import Overlay from '../components/Overlay';
import PopOver from '../components/PopOver'; import PopOver from '../components/PopOver';
import * as cx from 'classnames'; import cx from 'classnames';
import {isVisible} from '../utils/helper'; import {isVisible} from '../utils/helper';
import {filter} from '../utils/tpl'; import {filter} from '../utils/tpl';

View File

@ -1,4 +1,4 @@
import * as React from 'react'; import React from 'react';
import {Renderer, RendererProps} from '../factory'; import {Renderer, RendererProps} from '../factory';
import {Schema} from '../types'; import {Schema} from '../types';
import {resolveVariable} from '../utils/tpl-builtin'; import {resolveVariable} from '../utils/tpl-builtin';

View File

@ -1,4 +1,4 @@
import * as React from 'react'; import React from 'react';
import { import {
FormItem, FormItem,
FormControlProps FormControlProps

View File

@ -1,9 +1,9 @@
import * as React from 'react'; import React from 'react';
import { import {
FormItem, FormItem,
FormControlProps FormControlProps
} from './Item'; } from './Item';
import * as cx from 'classnames'; import cx from 'classnames';
import {Button} from '../../types'; import {Button} from '../../types';
export interface ButtonProps extends FormControlProps, Button { export interface ButtonProps extends FormControlProps, Button {

View File

@ -1,5 +1,5 @@
import * as React from 'react'; import React from 'react';
import * as cx from 'classnames'; import cx from 'classnames';
import { import {
OptionsControl, OptionsControl,
OptionsControlProps OptionsControlProps

View File

@ -1,9 +1,9 @@
import * as React from 'react'; import React from 'react';
import { import {
FormItem, FormItem,
FormControlProps FormControlProps
} from './Item'; } from './Item';
import * as cx from 'classnames'; import cx from 'classnames';
import { import {
Button Button
} from '../../types'; } from '../../types';

View File

@ -1,5 +1,5 @@
import * as React from 'react'; import React from 'react';
import * as cx from 'classnames'; import cx from 'classnames';
import { import {
OptionsControl, OptionsControl,
OptionsControlProps, OptionsControlProps,

View File

@ -1,9 +1,9 @@
import * as React from 'react'; import React from 'react';
import { import {
FormItem, FormItem,
FormControlProps FormControlProps
} from './Item'; } from './Item';
import * as cx from 'classnames'; import cx from 'classnames';
import Checkbox from '../../components/Checkbox'; import Checkbox from '../../components/Checkbox';
export interface CheckboxProps extends FormControlProps { export interface CheckboxProps extends FormControlProps {

View File

@ -1,9 +1,9 @@
import * as React from 'react'; import React from 'react';
import { import {
OptionsControl, OptionsControl,
OptionsControlProps OptionsControlProps
} from './Options'; } from './Options';
import * as cx from 'classnames'; import cx from 'classnames';
import Checkbox from '../../components/Checkbox'; import Checkbox from '../../components/Checkbox';
import chunk = require('lodash/chunk'); import chunk = require('lodash/chunk');

View File

@ -1,4 +1,4 @@
import * as React from 'react'; import React from 'react';
import { import {
FormItem, FormItem,
FormControlProps FormControlProps

View File

@ -1,9 +1,9 @@
import * as React from 'react'; import React from 'react';
import { import {
FormItem, FormItem,
FormControlProps FormControlProps
} from './Item'; } from './Item';
import * as cx from 'classnames'; import cx from 'classnames';
import ColorPicker from '../../components/ColorPicker'; import ColorPicker from '../../components/ColorPicker';

View File

@ -1,4 +1,4 @@
import * as React from 'react'; import React from 'react';
import { import {
findDOMNode findDOMNode
} from 'react-dom'; } from 'react-dom';
@ -6,7 +6,7 @@ import {
FormItem, FormItem,
FormControlProps FormControlProps
} from './Item'; } from './Item';
import * as cx from 'classnames'; import cx from 'classnames';
import { Schema, Action, Api } from '../../types'; import { Schema, Action, Api } from '../../types';
import {ComboStore, IComboStore} from '../../store/combo'; import {ComboStore, IComboStore} from '../../store/combo';
import { observer } from "mobx-react"; import { observer } from "mobx-react";

View File

@ -1,8 +1,8 @@
import * as React from 'react'; import React from 'react';
import { import {
Renderer Renderer
} from '../../factory'; } from '../../factory';
import * as cx from 'classnames'; import cx from 'classnames';
import Container from '../Container'; import Container from '../Container';
import FormItem, { FormControlProps } from './Item'; import FormItem, { FormControlProps } from './Item';

View File

@ -1,5 +1,5 @@
import * as React from 'react'; import React from 'react';
import * as PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import {IFormStore, IFormItemStore} from '../../store/form'; import {IFormStore, IFormItemStore} from '../../store/form';
import debouce = require('lodash/debounce'); import debouce = require('lodash/debounce');

View File

@ -1,13 +1,13 @@
import * as React from 'react'; import React from 'react';
import { import {
FormItem, FormItem,
FormControlProps FormControlProps
} from './Item'; } from './Item';
import * as cx from 'classnames'; import cx from 'classnames';
import { import {
filterDate filterDate
} from '../../utils/tpl-builtin'; } from '../../utils/tpl-builtin';
import * as moment from 'moment'; import moment from 'moment';
import 'moment/locale/zh-cn'; import 'moment/locale/zh-cn';
import DatePicker from '../../components/DatePicker'; import DatePicker from '../../components/DatePicker';

View File

@ -1,13 +1,13 @@
import * as React from 'react'; import React from 'react';
import { import {
FormItem, FormItem,
FormControlProps FormControlProps
} from './Item'; } from './Item';
import * as cx from 'classnames'; import cx from 'classnames';
import { import {
filterDate filterDate
} from '../../utils/tpl-builtin'; } from '../../utils/tpl-builtin';
import * as moment from 'moment'; import moment from 'moment';
import 'moment/locale/zh-cn'; import 'moment/locale/zh-cn';
import DateRangePicker from '../../components/DateRangePicker'; import DateRangePicker from '../../components/DateRangePicker';

View File

@ -1,4 +1,4 @@
import * as React from 'react'; import React from 'react';
import { import {
Renderer Renderer
} from '../../factory'; } from '../../factory';
@ -9,7 +9,7 @@ import {
import { import {
filter, filter,
} from '../../utils/tpl'; } from '../../utils/tpl';
import * as cx from 'classnames'; import cx from 'classnames';
import LazyComponent from '../../components/LazyComponent'; import LazyComponent from '../../components/LazyComponent';
import debouce = require('lodash/debounce'); import debouce = require('lodash/debounce');

View File

@ -1,9 +1,9 @@
import * as React from 'react'; import React from 'react';
import { import {
FormItem, FormItem,
FormControlProps FormControlProps
} from './Item'; } from './Item';
import * as cx from 'classnames'; import cx from 'classnames';
import LazyComponent from '../../components/LazyComponent'; import LazyComponent from '../../components/LazyComponent';
import debouce = require('lodash/debounce'); import debouce = require('lodash/debounce');

View File

@ -1,10 +1,10 @@
import * as React from 'react'; import React from 'react';
import { import {
Renderer, Renderer,
RendererProps RendererProps
} from '../../factory'; } from '../../factory';
import Collapse from '../Collapse'; import Collapse from '../Collapse';
import * as cx from 'classnames'; import cx from 'classnames';
export interface FieldSetProps extends RendererProps { export interface FieldSetProps extends RendererProps {
title?: string; title?: string;

View File

@ -1,10 +1,10 @@
import * as React from 'react'; import React from 'react';
import { import {
FormItem, FormItem,
FormControlProps FormControlProps
} from './Item'; } from './Item';
import * as cx from 'classnames'; import cx from 'classnames';
import * as qs from 'qs'; import qs from 'qs';
import find = require('lodash/find'); import find = require('lodash/find');
import isPlainObject = require('lodash/isPlainObject'); import isPlainObject = require('lodash/isPlainObject');
import {mapLimit} from 'async'; import {mapLimit} from 'async';

View File

@ -1,4 +1,4 @@
import * as React from 'react'; import React from 'react';
import { import {
FormItem, FormItem,
FormControlProps FormControlProps

View File

@ -10,9 +10,9 @@ import {
FormControlProps FormControlProps
} from './Item'; } from './Item';
import pick = require("lodash/pick"); import pick = require("lodash/pick");
import * as React from 'react'; import React from 'react';
import { Row, Col } from "react-bootstrap"; import { Row, Col } from "react-bootstrap";
import * as cx from 'classnames'; import cx from 'classnames';
export interface GridProps extends FormControlProps {}; export interface GridProps extends FormControlProps {};
const defaultHorizontal = { const defaultHorizontal = {

View File

@ -1,11 +1,11 @@
import * as React from 'react'; import React from 'react';
import { import {
Renderer, Renderer,
RendererProps RendererProps
} from '../../factory'; } from '../../factory';
import { Schema } from '../../types'; import { Schema } from '../../types';
import {isVisible, getWidthRate, makeHorizontalDeeper} from '../../utils/helper'; import {isVisible, getWidthRate, makeHorizontalDeeper} from '../../utils/helper';
import * as cx from 'classnames'; import cx from 'classnames';
import { FormItemWrap } from './Item'; import { FormItemWrap } from './Item';
export interface InputGroupProps extends RendererProps { export interface InputGroupProps extends RendererProps {

View File

@ -1,4 +1,4 @@
import * as React from 'react'; import React from 'react';
import { import {
Renderer, Renderer,
RendererProps RendererProps
@ -9,7 +9,7 @@ import {
} from './Item'; } from './Item';
import HBox from '../HBox'; import HBox from '../HBox';
import { Schema } from '../../types'; import { Schema } from '../../types';
import * as cx from 'classnames'; import cx from 'classnames';
import { isVisible } from '../../utils/helper'; import { isVisible } from '../../utils/helper';
interface HBoxProps extends FormControlProps { interface HBoxProps extends FormControlProps {

View File

@ -1,4 +1,4 @@
import * as React from 'react'; import React from 'react';
import { import {
FormItem, FormItem,
FormControlProps FormControlProps

View File

@ -1,7 +1,7 @@
import * as React from 'react'; import React from 'react';
import * as cx from 'classnames'; import cx from 'classnames';
import * as matchSorter from 'match-sorter'; import matchSorter from 'match-sorter';
import * as keycode from "keycode"; import keycode from "keycode";
import Downshift, { StateChangeOptions } from 'downshift'; import Downshift, { StateChangeOptions } from 'downshift';
import { autobind } from '../../utils/helper'; import { autobind } from '../../utils/helper';
import { ICONS } from './IconPicker-icons'; import { ICONS } from './IconPicker-icons';

View File

@ -1,17 +1,17 @@
import * as React from 'react'; import React from 'react';
import { import {
FormItem, FormItem,
FormControlProps FormControlProps
} from './Item'; } from './Item';
import * as cx from 'classnames'; import cx from 'classnames';
import Cropper from 'react-cropper'; import Cropper from 'react-cropper';
import * as DropZone from 'react-dropzone'; import DropZone from 'react-dropzone';
import 'blueimp-canvastoblob'; import 'blueimp-canvastoblob';
// @require 'cropperjs/dist/cropper.css'; // @require 'cropperjs/dist/cropper.css';
// jest 不能支持这种写法 // jest 不能支持这种写法
// import 'cropperjs/dist/cropper.css'; // import 'cropperjs/dist/cropper.css';
import find = require('lodash/find'); import find = require('lodash/find');
import * as qs from 'qs'; import qs from 'qs';
import { FileValue } from './Image'; import { FileValue } from './Image';
import {Payload} from '../../types'; import {Payload} from '../../types';
import { filter } from '../../utils/tpl'; import { filter } from '../../utils/tpl';

View File

@ -1,4 +1,4 @@
import * as React from 'react'; import React from 'react';
import { import {
Renderer, Renderer,
RendererProps RendererProps
@ -6,7 +6,7 @@ import {
import { Schema } from '../../types'; import { Schema } from '../../types';
import Collapse from '../Collapse'; import Collapse from '../Collapse';
import {makeColumnClassBuild, makeHorizontalDeeper, isVisible, isDisabled} from '../../utils/helper'; import {makeColumnClassBuild, makeHorizontalDeeper, isVisible, isDisabled} from '../../utils/helper';
import * as cx from 'classnames'; import cx from 'classnames';
import getExprProperties from '../../utils/filter-schema'; import getExprProperties from '../../utils/filter-schema';
import { import {
FormItem, FormItem,

View File

@ -1,7 +1,7 @@
import * as React from 'react'; import React from 'react';
import hoistNonReactStatic = require('hoist-non-react-statics'); import hoistNonReactStatic = require('hoist-non-react-statics');
import { IFormStore, IFormItemStore } from '../../store/form'; import { IFormStore, IFormItemStore } from '../../store/form';
import * as cx from 'classnames'; import cx from 'classnames';
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import debouce = require('lodash/debounce'); import debouce = require('lodash/debounce');
import { onPatch } from 'mobx-state-tree'; import { onPatch } from 'mobx-state-tree';

View File

@ -1,4 +1,4 @@
import * as React from 'react'; import React from 'react';
import { import {
OptionsControl, OptionsControl,
OptionsControlProps, OptionsControlProps,

View File

@ -3,8 +3,8 @@
* @author fex * @author fex
*/ */
import * as React from 'react'; import React from 'react';
import * as cx from 'classnames'; import cx from 'classnames';
import { FormControlProps, FormItem } from './Item'; import { FormControlProps, FormItem } from './Item';
import { buildApi, isValidApi } from '../../utils/api'; import { buildApi, isValidApi } from '../../utils/api';
import { Checkbox } from '../../components'; import { Checkbox } from '../../components';

View File

@ -1,4 +1,4 @@
import * as React from 'react'; import React from 'react';
import xorBy = require('lodash/xorBy') import xorBy = require('lodash/xorBy')
import unionBy = require('lodash/unionBy') import unionBy = require('lodash/unionBy')
import Overlay from '../../components/Overlay'; import Overlay from '../../components/Overlay';

View File

@ -1,10 +1,10 @@
import * as React from 'react'; import React from 'react';
import { import {
FormItem, FormItem,
FormControlProps, FormControlProps,
} from './Item'; } from './Item';
import * as cx from 'classnames'; import cx from 'classnames';
import * as InputNumber from 'rc-input-number'; import InputNumber from 'rc-input-number';
import {filter} from '../../utils/tpl'; import {filter} from '../../utils/tpl';
export interface NumberProps extends FormControlProps { export interface NumberProps extends FormControlProps {

View File

@ -14,7 +14,7 @@ import {
} from '../../store/formItem'; } from '../../store/formItem';
export type OptionsControlComponent = React.ComponentType<FormControlProps>; export type OptionsControlComponent = React.ComponentType<FormControlProps>;
import * as React from 'react'; import React from 'react';
import { resolveVariableAndFilter } from '../../utils/tpl-builtin'; import { resolveVariableAndFilter } from '../../utils/tpl-builtin';
import { evalExpression } from '../../utils/tpl'; import { evalExpression } from '../../utils/tpl';
import { Option, OptionProps, normalizeOptions } from '../../components/Select'; import { Option, OptionProps, normalizeOptions } from '../../components/Select';

View File

@ -1,11 +1,11 @@
import * as React from 'react'; import React from 'react';
import { import {
Renderer, Renderer,
RendererProps RendererProps
} from '../../factory'; } from '../../factory';
import Panel from '../Panel'; import Panel from '../Panel';
import { Schema } from '../../types'; import { Schema } from '../../types';
import * as cx from 'classnames'; import cx from 'classnames';
@Renderer({ @Renderer({
test: /(^|\/)form(?:\/.+)?\/control\/(?:\d+\/)?panel$/, test: /(^|\/)form(?:\/.+)?\/control\/(?:\d+\/)?panel$/,

View File

@ -1,10 +1,10 @@
import * as React from 'react'; import React from 'react';
import { import {
OptionsControl, OptionsControl,
OptionsControlProps, OptionsControlProps,
Option Option
} from './Options'; } from './Options';
import * as cx from 'classnames'; import cx from 'classnames';
import Button from '../../components/Button'; import Button from '../../components/Button';
import { import {
SchemaNode, SchemaNode,

View File

@ -1,9 +1,9 @@
import * as React from 'react'; import React from 'react';
import { import {
FormItem, FormItem,
FormControlProps FormControlProps
} from './Item'; } from './Item';
import * as cx from 'classnames'; import cx from 'classnames';
import Radios from '../../components/Radios'; import Radios from '../../components/Radios';
import { import {
OptionsControl, OptionsControl,

View File

@ -1,4 +1,4 @@
import * as React from 'react'; import React from 'react';
import isNumber = require('lodash/isNumber'); import isNumber = require('lodash/isNumber');
import isObject = require('lodash/isObject'); import isObject = require('lodash/isObject');
import isEqual = require('lodash/isEqual'); import isEqual = require('lodash/isEqual');
@ -6,7 +6,7 @@ import {
FormItem, FormItem,
FormControlProps FormControlProps
} from './Item'; } from './Item';
import * as cx from 'classnames'; import cx from 'classnames';
import InputRange from '../../components/Range'; import InputRange from '../../components/Range';
import { closeIcon } from '../../components/icons'; import { closeIcon } from '../../components/icons';

View File

@ -1,4 +1,4 @@
import * as React from 'react'; import React from 'react';
import { import {
FormItem, FormItem,
FormControlProps FormControlProps

View File

@ -4,8 +4,8 @@
*/ */
/* eslint fecs-indent: [0, "space", 2, 2] */ /* eslint fecs-indent: [0, "space", 2, 2] */
import * as React from 'react'; import React from 'react';
import * as cx from 'classnames'; import cx from 'classnames';
import { import {
FormItem, FormItem,
FormControlProps FormControlProps

View File

@ -1,9 +1,9 @@
import * as React from 'react'; import React from 'react';
import { import {
FormItem, FormItem,
FormControlProps FormControlProps
} from './Item'; } from './Item';
import * as cx from 'classnames'; import cx from 'classnames';
import LazyComponent from '../../components/LazyComponent'; import LazyComponent from '../../components/LazyComponent';
import { noop } from '../../utils/helper'; import { noop } from '../../utils/helper';

View File

@ -1,5 +1,5 @@
import * as React from 'react'; import React from 'react';
import * as cx from 'classnames'; import cx from 'classnames';
import { import {
OptionsControl, OptionsControl,
OptionsControlProps, OptionsControlProps,

View File

@ -1,5 +1,5 @@
import * as React from 'react'; import React from 'react';
import * as PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { import {
Renderer, Renderer,
RendererProps RendererProps

View File

@ -1,9 +1,9 @@
import * as React from 'react'; import React from 'react';
import { import {
FormItem, FormItem,
FormControlProps FormControlProps
} from './Item'; } from './Item';
import * as cx from 'classnames'; import cx from 'classnames';
import {TableCell} from '../Table'; import {TableCell} from '../Table';
import PopOver from '../PopOver'; import PopOver from '../PopOver';
import QuickEdit from '../QuickEdit'; import QuickEdit from '../QuickEdit';

View File

@ -1,9 +1,9 @@
import * as React from 'react'; import React from 'react';
import { import {
FormItem, FormItem,
FormControlProps FormControlProps
} from './Item'; } from './Item';
import * as cx from 'classnames'; import cx from 'classnames';
import omit = require('lodash/omit'); import omit = require('lodash/omit');
import pick = require('lodash/pick'); import pick = require('lodash/pick');
import { createObject } from '../../utils/helper'; import { createObject } from '../../utils/helper';

View File

@ -1,9 +1,9 @@
import * as React from 'react'; import React from 'react';
import { import {
FormItem, FormItem,
FormControlProps FormControlProps
} from './Item'; } from './Item';
import * as cx from 'classnames'; import cx from 'classnames';
import Switch from '../../components/Switch'; import Switch from '../../components/Switch';
export interface SwitchProps extends FormControlProps { export interface SwitchProps extends FormControlProps {

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