import require 改成 import from
This commit is contained in:
parent
be462a25d2
commit
d01e0753a3
|
@ -4,9 +4,9 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import find = require('lodash/find');
|
||||
import find from 'lodash/find';
|
||||
import PropTypes from 'prop-types';
|
||||
import hoistNonReactStatic = require('hoist-non-react-statics');
|
||||
import hoistNonReactStatic from 'hoist-non-react-statics';
|
||||
import qs from 'qs';
|
||||
import {dataMapping} from './utils/tpl-builtin';
|
||||
import {RendererEnv, RendererProps} from './factory';
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
*/
|
||||
|
||||
import React from "react";
|
||||
import uncontrollable = require("uncontrollable");
|
||||
import uncontrollable from "uncontrollable";
|
||||
import Checkbox from "./Checkbox";
|
||||
import find = require("lodash/find");
|
||||
import chunk = require("lodash/chunk");
|
||||
import find from "lodash/find";
|
||||
import chunk from "lodash/chunk";
|
||||
import { flattenTree, isObject } from "../utils/helper";
|
||||
import { ClassNamesFn, themeable } from "../theme";
|
||||
import { optionValueCompare } from "./Select";
|
||||
// import isPlainObject = require('lodash/isPlainObject');
|
||||
// import isPlainObject from 'lodash/isPlainObject';
|
||||
|
||||
export interface Option {
|
||||
label?: string;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import css = require('dom-helpers/style/index');
|
||||
import css from 'dom-helpers/style/index';
|
||||
import {ClassNamesFn, themeable} from '../theme';
|
||||
import Transition, {
|
||||
EXITED,
|
||||
|
|
|
@ -10,7 +10,7 @@ import {findDOMNode} from 'react-dom';
|
|||
import {SketchPicker, GithubPicker, ColorResult} from 'react-color';
|
||||
import {Icon} from './icons';
|
||||
import Overlay from './Overlay';
|
||||
import uncontrollable = require('uncontrollable');
|
||||
import uncontrollable from 'uncontrollable';
|
||||
import PopOver from './PopOver';
|
||||
import {ClassNamesFn, themeable} from '../theme';
|
||||
import {autobind} from '../utils/helper';
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
* @author fex
|
||||
*/
|
||||
|
||||
import React = require('react');
|
||||
import moment = require('moment');
|
||||
import React from 'react';
|
||||
import moment from 'moment';
|
||||
import {findDOMNode} from 'react-dom';
|
||||
import cx from 'classnames';
|
||||
import {Icon} from './icons';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import VisibilitySensor = require('react-visibility-sensor');
|
||||
import VisibilitySensor from 'react-visibility-sensor';
|
||||
import Spinner from './Spinner';
|
||||
|
||||
export interface LazyComponentProps {
|
||||
|
|
|
@ -14,10 +14,10 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import uncontrollable = require('uncontrollable');
|
||||
import uncontrollable from 'uncontrollable';
|
||||
import Checkbox from './Checkbox';
|
||||
import {value2array, OptionProps, Option} from './Checkboxes';
|
||||
import chunk = require('lodash/chunk');
|
||||
import chunk from 'lodash/chunk';
|
||||
import {ClassNamesFn, themeable} from '../theme';
|
||||
|
||||
interface RadioProps extends OptionProps {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import InputRange from 'react-input-range';
|
||||
import uncontrollable = require('uncontrollable');
|
||||
import uncontrollable from 'uncontrollable';
|
||||
import cx from 'classnames';
|
||||
import {RendererProps} from '../factory';
|
||||
import {ClassNamesFn, themeable} from '../theme';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* @date 2017-11-07
|
||||
*/
|
||||
|
||||
import uncontrollable = require('uncontrollable');
|
||||
import uncontrollable from 'uncontrollable';
|
||||
import React from 'react';
|
||||
import 'react-datetime/css/react-datetime.css';
|
||||
import Overlay from './Overlay';
|
||||
|
@ -15,9 +15,9 @@ import {closeIcon, Icon} from './icons';
|
|||
// @ts-ignore
|
||||
import matchSorter from 'match-sorter';
|
||||
import {noop, isObject} from '../utils/helper';
|
||||
import find = require('lodash/find');
|
||||
import isPlainObject = require('lodash/isPlainObject');
|
||||
import union = require('lodash/union');
|
||||
import find from 'lodash/find';
|
||||
import isPlainObject from 'lodash/isPlainObject';
|
||||
import union from 'lodash/union';
|
||||
import {highlight} from '../renderers/Form/Options';
|
||||
import {findDOMNode} from 'react-dom';
|
||||
import {ClassNamesFn, themeable} from '../theme';
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* @author fex
|
||||
*/
|
||||
|
||||
import React = require('react');
|
||||
import React from 'react';
|
||||
import Html from './Html';
|
||||
import uncontrollable = require('uncontrollable');
|
||||
import uncontrollable from 'uncontrollable';
|
||||
import {findDOMNode} from 'react-dom';
|
||||
import Tooltip from './Tooltip';
|
||||
import {ClassNamesFn, themeable} from '../theme';
|
||||
|
|
|
@ -29,13 +29,13 @@ import {
|
|||
} from './types';
|
||||
import {observer} from 'mobx-react';
|
||||
import getExprProperties from './utils/filter-schema';
|
||||
import hoistNonReactStatic = require('hoist-non-react-statics');
|
||||
import omit = require('lodash/omit');
|
||||
import difference = require('lodash/difference');
|
||||
import isPlainObject = require('lodash/isPlainObject');
|
||||
import hoistNonReactStatic from 'hoist-non-react-statics';
|
||||
import omit from 'lodash/omit';
|
||||
import difference from 'lodash/difference';
|
||||
import isPlainObject from 'lodash/isPlainObject';
|
||||
import Scoped from './Scoped';
|
||||
import {getTheme, ThemeInstance, ClassNamesFn, ThemeContext} from './theme';
|
||||
import find = require('lodash/find');
|
||||
import find from 'lodash/find';
|
||||
import Alert from './components/Alert2';
|
||||
import {LazyComponent} from './components';
|
||||
import ImageGallery from './components/ImageGallery';
|
||||
|
|
|
@ -2,7 +2,7 @@ import React from 'react';
|
|||
import {Renderer, RendererProps} from '../factory';
|
||||
import {filter} from '../utils/tpl';
|
||||
import Button from '../components/Button';
|
||||
import pick = require('lodash/pick');
|
||||
import pick from 'lodash/pick';
|
||||
const ActionProps = [
|
||||
'dialog',
|
||||
'drawer',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import {Renderer, RendererProps} from '../factory';
|
||||
import React = require('react');
|
||||
import React from 'react';
|
||||
import Alert, {AlertProps} from '../components/Alert2';
|
||||
|
||||
@Renderer({
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React from 'react';
|
||||
import upperFirst = require('lodash/upperFirst');
|
||||
import upperFirst from 'lodash/upperFirst';
|
||||
import {Renderer, RendererProps} from '../factory';
|
||||
import {autobind} from '../utils/helper';
|
||||
import {Icon} from '../components/icons';
|
||||
|
|
|
@ -14,18 +14,18 @@ import {
|
|||
qsstringify
|
||||
} from '../utils/helper';
|
||||
import {observer} from 'mobx-react';
|
||||
import partition = require('lodash/partition');
|
||||
import partition from 'lodash/partition';
|
||||
import Scoped, {ScopedContext, IScopedContext} from '../Scoped';
|
||||
import Button from '../components/Button';
|
||||
import Select from '../components/Select';
|
||||
import getExprProperties from '../utils/filter-schema';
|
||||
import pick = require('lodash/pick');
|
||||
import pick from 'lodash/pick';
|
||||
import qs from 'qs';
|
||||
import {findDOMNode} from 'react-dom';
|
||||
import {evalExpression, filter} from '../utils/tpl';
|
||||
import {isValidApi, buildApi, isEffectiveApi} from '../utils/api';
|
||||
import omit = require('lodash/omit');
|
||||
import find = require('lodash/find');
|
||||
import omit from 'lodash/omit';
|
||||
import find from 'lodash/find';
|
||||
import Html from '../components/Html';
|
||||
import {Spinner} from '../components';
|
||||
|
||||
|
|
|
@ -13,9 +13,9 @@ import {
|
|||
ucFirst
|
||||
} from '../utils/helper';
|
||||
import {resolveVariable} from '../utils/tpl-builtin';
|
||||
import Sortable = require('sortablejs');
|
||||
import Sortable from 'sortablejs';
|
||||
import {filter} from '../utils/tpl';
|
||||
import debounce = require('lodash/debounce');
|
||||
import debounce from 'lodash/debounce';
|
||||
import {resizeSensor} from '../utils/resize-sensor';
|
||||
|
||||
export interface Column {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import React from 'react';
|
||||
import {RendererProps} from '../factory';
|
||||
import cx from 'classnames';
|
||||
import hoistNonReactStatic = require('hoist-non-react-statics');
|
||||
import hoistNonReactStatic from 'hoist-non-react-statics';
|
||||
import Button from '../components/Button';
|
||||
import {filter} from '../utils/tpl';
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import {Renderer, RendererProps} from '../factory';
|
|||
import {SchemaNode, Schema, Action} from '../types';
|
||||
import {filter} from '../utils/tpl';
|
||||
import Modal from '../components/Modal';
|
||||
import findLast = require('lodash/findLast');
|
||||
import findLast from 'lodash/findLast';
|
||||
import {guid, isVisible} from '../utils/helper';
|
||||
import {reaction} from 'mobx';
|
||||
import {Icon} from '../components/icons';
|
||||
|
|
|
@ -3,7 +3,7 @@ import {ScopedContext, IScopedContext} from '../Scoped';
|
|||
import {Renderer, RendererProps} from '../factory';
|
||||
import {SchemaNode, Schema, Action} from '../types';
|
||||
import {default as DrawerContainer} from '../components/Drawer';
|
||||
import findLast = require('lodash/findLast');
|
||||
import findLast from 'lodash/findLast';
|
||||
import {guid, isVisible} from '../utils/helper';
|
||||
import {reaction} from 'mobx';
|
||||
import {findDOMNode} from 'react-dom';
|
||||
|
|
|
@ -2,7 +2,7 @@ import React from 'react';
|
|||
import {OptionsControl, OptionsControlProps, Option} from './Options';
|
||||
import cx from 'classnames';
|
||||
import Checkbox from '../../components/Checkbox';
|
||||
import chunk = require('lodash/chunk');
|
||||
import chunk from 'lodash/chunk';
|
||||
|
||||
export interface CheckboxesProps extends OptionsControlProps {
|
||||
placeholder?: any;
|
||||
|
|
|
@ -14,9 +14,9 @@ import {
|
|||
autobind,
|
||||
isObjectShallowModified
|
||||
} from '../../utils/helper';
|
||||
import Sortable = require('sortablejs');
|
||||
import Sortable from 'sortablejs';
|
||||
import {evalExpression, filter} from '../../utils/tpl';
|
||||
import find = require('lodash/find');
|
||||
import find from 'lodash/find';
|
||||
import Select from '../../components/Select';
|
||||
import {dataMapping, resolveVariable} from '../../utils/tpl-builtin';
|
||||
import {isEffectiveApi} from '../../utils/api';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react';
|
||||
import {IFormStore, IFormItemStore} from '../../store/form';
|
||||
import debouce = require('lodash/debounce');
|
||||
import debouce from 'lodash/debounce';
|
||||
|
||||
import {RendererProps, Renderer} from '../../factory';
|
||||
import {ComboStore, IComboStore, IUniqueGroup} from '../../store/combo';
|
||||
|
|
|
@ -4,7 +4,7 @@ import {FormItem, FormControlProps} from './Item';
|
|||
import {filter} from '../../utils/tpl';
|
||||
import cx from 'classnames';
|
||||
import LazyComponent from '../../components/LazyComponent';
|
||||
import debouce = require('lodash/debounce');
|
||||
import debouce from 'lodash/debounce';
|
||||
import {isPureVariable} from '../../utils/tpl-builtin';
|
||||
|
||||
function loadComponent(): Promise<React.ReactType> {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
import {FormItem, FormControlProps} from './Item';
|
||||
import LazyComponent from '../../components/LazyComponent';
|
||||
import debouce = require('lodash/debounce');
|
||||
import debouce from 'lodash/debounce';
|
||||
import Editor from '../../components/Editor';
|
||||
|
||||
export interface EditorProps extends FormControlProps {
|
||||
|
|
|
@ -2,8 +2,8 @@ import React from 'react';
|
|||
import {FormItem, FormControlProps} from './Item';
|
||||
import cx from 'classnames';
|
||||
import qs from 'qs';
|
||||
import find = require('lodash/find');
|
||||
import isPlainObject = require('lodash/isPlainObject');
|
||||
import find from 'lodash/find';
|
||||
import isPlainObject from 'lodash/isPlainObject';
|
||||
import {mapLimit} from 'async';
|
||||
import ImageControl from './Image';
|
||||
import {Payload, ApiObject, ApiString} from '../../types';
|
||||
|
|
|
@ -3,7 +3,7 @@ import Grid, {ColumnNode, Column, ColProps, ColumnArray} from '../Grid';
|
|||
import {Schema} from '../../types';
|
||||
|
||||
import {FormItem, FormControlProps} from './Item';
|
||||
import pick = require('lodash/pick');
|
||||
import pick from 'lodash/pick';
|
||||
import React from 'react';
|
||||
import cx from 'classnames';
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import {FormItem, FormControlProps} from './Item';
|
|||
import Cropper from 'react-cropper';
|
||||
import DropZone from 'react-dropzone';
|
||||
import 'blueimp-canvastoblob';
|
||||
import find = require('lodash/find');
|
||||
import find from 'lodash/find';
|
||||
import qs from 'qs';
|
||||
import {Payload} from '../../types';
|
||||
import {buildApi} from '../../utils/api';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React from 'react';
|
||||
import hoistNonReactStatic = require('hoist-non-react-statics');
|
||||
import hoistNonReactStatic from 'hoist-non-react-statics';
|
||||
import {IFormItemStore, IFormStore} from '../../store/form';
|
||||
import {reaction} from 'mobx';
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react';
|
||||
import xorBy = require('lodash/xorBy');
|
||||
import unionBy = require('lodash/unionBy');
|
||||
import xorBy from 'lodash/xorBy';
|
||||
import unionBy from 'lodash/unionBy';
|
||||
import Overlay from '../../components/Overlay';
|
||||
import Checkbox from '../../components/Checkbox';
|
||||
import PopOver from '../../components/PopOver';
|
||||
|
|
|
@ -3,7 +3,7 @@ import {OptionsControl, OptionsControlProps, Option} from './Options';
|
|||
import cx from 'classnames';
|
||||
import Button from '../../components/Button';
|
||||
import {SchemaNode, Schema, Action} from '../../types';
|
||||
import find = require('lodash/find');
|
||||
import find from 'lodash/find';
|
||||
import {
|
||||
anyChanged,
|
||||
autobind,
|
||||
|
@ -11,7 +11,7 @@ import {
|
|||
noop,
|
||||
createObject
|
||||
} from '../../utils/helper';
|
||||
import findIndex = require('lodash/findIndex');
|
||||
import findIndex from 'lodash/findIndex';
|
||||
import Html from '../../components/Html';
|
||||
import {filter} from '../../utils/tpl';
|
||||
import {Icon} from '../../components/icons';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
import isNumber = require('lodash/isNumber');
|
||||
import isObject = require('lodash/isObject');
|
||||
import isEqual = require('lodash/isEqual');
|
||||
import isNumber from 'lodash/isNumber';
|
||||
import isObject from 'lodash/isObject';
|
||||
import isEqual from 'lodash/isEqual';
|
||||
import {FormItem, FormControlProps} from './Item';
|
||||
import cx from 'classnames';
|
||||
import InputRange from '../../components/Range';
|
||||
|
|
|
@ -2,8 +2,8 @@ import React from 'react';
|
|||
import cx from 'classnames';
|
||||
import {OptionsControl, OptionsControlProps, Option} from './Options';
|
||||
import Select from '../../components/Select';
|
||||
import find = require('lodash/find');
|
||||
import debouce = require('lodash/debounce');
|
||||
import find from 'lodash/find';
|
||||
import debouce from 'lodash/debounce';
|
||||
import {Api} from '../../types';
|
||||
import {isEffectiveApi} from '../../utils/api';
|
||||
import {isEmpty, createObject} from '../../utils/helper';
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import React from 'react';
|
||||
import {FormItem, FormControlProps} from './Item';
|
||||
import cx from 'classnames';
|
||||
import omit = require('lodash/omit');
|
||||
import pick = require('lodash/pick');
|
||||
import omit from 'lodash/omit';
|
||||
import pick from 'lodash/pick';
|
||||
import {createObject} from '../../utils/helper';
|
||||
|
||||
export interface SubFormProps extends FormControlProps {
|
||||
|
|
|
@ -6,10 +6,10 @@ import {createObject, isObjectShallowModified} from '../../utils/helper';
|
|||
import {RendererData, Action, Api, Payload} from '../../types';
|
||||
import {isEffectiveApi} from '../../utils/api';
|
||||
import {filter} from '../../utils/tpl';
|
||||
import omit = require('lodash/omit');
|
||||
import omit from 'lodash/omit';
|
||||
import {dataMapping} from '../../utils/tpl-builtin';
|
||||
import findIndex = require('lodash/findIndex');
|
||||
import memoize = require('lodash/memoize');
|
||||
import findIndex from 'lodash/findIndex';
|
||||
import memoize from 'lodash/memoize';
|
||||
|
||||
export interface TableProps extends FormControlProps {
|
||||
placeholder?: string;
|
||||
|
|
|
@ -4,8 +4,8 @@ import cx from 'classnames';
|
|||
import {Action} from '../../types';
|
||||
import Downshift from 'downshift';
|
||||
import matchSorter from 'match-sorter';
|
||||
import debouce = require('lodash/debounce');
|
||||
import find = require('lodash/find');
|
||||
import debouce from 'lodash/debounce';
|
||||
import find from 'lodash/find';
|
||||
import {Icon} from '../../components/icons';
|
||||
import {Portal} from 'react-overlays';
|
||||
import {findDOMNode} from 'react-dom';
|
||||
|
|
|
@ -5,9 +5,9 @@ import {Action} from '../../types';
|
|||
import Downshift, {StateChangeOptions} from 'downshift';
|
||||
// @ts-ignore
|
||||
import matchSorter from 'match-sorter';
|
||||
import debouce = require('lodash/debounce');
|
||||
import debouce from 'lodash/debounce';
|
||||
import {filter} from '../../utils/tpl';
|
||||
import find = require('lodash/find');
|
||||
import find from 'lodash/find';
|
||||
import {Icon} from '../../components/icons';
|
||||
import Input from '../../components/Input';
|
||||
import {autobind, createObject, setVariable} from '../../utils/helper';
|
||||
|
|
|
@ -8,8 +8,8 @@ import {Icon} from '../../components/icons';
|
|||
import TreeSelector from '../../components/Tree';
|
||||
// @ts-ignore
|
||||
import matchSorter from 'match-sorter';
|
||||
import debouce = require('lodash/debounce');
|
||||
import find = require('lodash/find');
|
||||
import debouce from 'lodash/debounce';
|
||||
import find from 'lodash/find';
|
||||
import {Api} from '../../types';
|
||||
import {isEffectiveApi} from '../../utils/api';
|
||||
|
||||
|
|
|
@ -16,16 +16,16 @@ import {
|
|||
isVisible,
|
||||
cloneObject
|
||||
} from '../../utils/helper';
|
||||
import debouce = require('lodash/debounce');
|
||||
import flatten = require('lodash/flatten');
|
||||
import find = require('lodash/find');
|
||||
import debouce from 'lodash/debounce';
|
||||
import flatten from 'lodash/flatten';
|
||||
import find from 'lodash/find';
|
||||
import Scoped, {
|
||||
ScopedContext,
|
||||
IScopedContext,
|
||||
ScopedComponentType
|
||||
} from '../../Scoped';
|
||||
import {IComboStore} from '../../store/combo';
|
||||
import qs = require('qs');
|
||||
import qs from 'qs';
|
||||
import {dataMapping} from '../../utils/tpl-builtin';
|
||||
import {isApiOutdated, isEffectiveApi} from '../../utils/api';
|
||||
import Spinner from '../../components/Spinner';
|
||||
|
|
|
@ -2,7 +2,7 @@ import React from 'react';
|
|||
import {Renderer, RendererProps} from '../factory';
|
||||
import {Schema} from '../types';
|
||||
import cx from 'classnames';
|
||||
import pick = require('lodash/pick');
|
||||
import pick from 'lodash/pick';
|
||||
|
||||
export const ColProps = ['lg', 'md', 'sm', 'xs'];
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ import {
|
|||
import {resolveVariable} from '../utils/tpl-builtin';
|
||||
import QuickEdit from './QuickEdit';
|
||||
import PopOver from './PopOver';
|
||||
import Sortable = require('sortablejs');
|
||||
import Sortable from 'sortablejs';
|
||||
import {TableCell} from './Table';
|
||||
import Copyable from './Copyable';
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import React from 'react';
|
|||
import {findDOMNode} from 'react-dom';
|
||||
import {RendererProps} from '../factory';
|
||||
import cx from 'classnames';
|
||||
import hoistNonReactStatic = require('hoist-non-react-statics');
|
||||
import hoistNonReactStatic from 'hoist-non-react-statics';
|
||||
import {RootCloseWrapper} from 'react-overlays';
|
||||
import PopOver, {Offset} from '../components/PopOver';
|
||||
import Overlay from '../components/Overlay';
|
||||
|
|
|
@ -3,7 +3,7 @@ import cx from 'classnames';
|
|||
import {Renderer, RendererProps} from '../factory';
|
||||
import {FormItem, FormControlProps} from './Form/Item';
|
||||
import {filter} from '../utils/tpl';
|
||||
import QrCode = require('qrcode.react');
|
||||
import QrCode from 'qrcode.react';
|
||||
|
||||
export interface QRCodeProps extends FormControlProps {
|
||||
codeSize?: number;
|
||||
|
|
|
@ -5,16 +5,16 @@
|
|||
|
||||
import React from 'react';
|
||||
import {findDOMNode} from 'react-dom';
|
||||
import find = require('lodash/find');
|
||||
import find from 'lodash/find';
|
||||
import PropTypes from 'prop-types';
|
||||
import isPlainObject = require('lodash/isPlainObject');
|
||||
import isPlainObject from 'lodash/isPlainObject';
|
||||
import {RendererProps} from '../factory';
|
||||
import cx from 'classnames';
|
||||
import hoistNonReactStatic = require('hoist-non-react-statics');
|
||||
import hoistNonReactStatic from 'hoist-non-react-statics';
|
||||
import onClickOutside from 'react-onclickoutside';
|
||||
import {Action} from '../types';
|
||||
import keycode from 'keycode';
|
||||
import matches = require('dom-helpers/query/matches');
|
||||
import matches from 'dom-helpers/query/matches';
|
||||
import Overlay from '../components/Overlay';
|
||||
import PopOver from '../components/PopOver';
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import React from 'react';
|
|||
import {findDOMNode} from 'react-dom';
|
||||
import {Renderer, RendererProps} from '../factory';
|
||||
import {SchemaNode, Action, Schema, Api, ApiObject} from '../types';
|
||||
import forEach = require('lodash/forEach');
|
||||
import forEach from 'lodash/forEach';
|
||||
import {filter} from '../utils/tpl';
|
||||
import cx from 'classnames';
|
||||
import DropDownButton from './DropDownButton';
|
||||
|
@ -25,15 +25,15 @@ import {
|
|||
buildApi,
|
||||
normalizeApi
|
||||
} from '../utils/api';
|
||||
import debounce = require('lodash/debounce');
|
||||
import xor = require('lodash/xor');
|
||||
import debounce from 'lodash/debounce';
|
||||
import xor from 'lodash/xor';
|
||||
import QuickEdit from './QuickEdit';
|
||||
import PopOver from '../components/PopOver';
|
||||
import Copyable from './Copyable';
|
||||
import Sortable = require('sortablejs');
|
||||
import flatMap = require('lodash/flatMap');
|
||||
import Sortable from 'sortablejs';
|
||||
import flatMap from 'lodash/flatMap';
|
||||
import {resizeSensor} from '../utils/resize-sensor';
|
||||
import find = require('lodash/find');
|
||||
import find from 'lodash/find';
|
||||
import Overlay from '../components/Overlay';
|
||||
import PopOverable from './PopOver';
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import React from 'react';
|
||||
import {Renderer, RendererProps} from '../factory';
|
||||
import {Action, Schema, SchemaNode} from '../types';
|
||||
import find = require('lodash/find');
|
||||
import find from 'lodash/find';
|
||||
import {isVisible, autobind, isDisabled} from '../utils/helper';
|
||||
import findIndex = require('lodash/findIndex');
|
||||
import findIndex from 'lodash/findIndex';
|
||||
import {Tabs as CTabs, Tab} from '../components/Tabs';
|
||||
import {ClassNamesFn} from '../theme';
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import {ServiceStore, IServiceStore} from '../store/service';
|
|||
import cx from 'classnames';
|
||||
import getExprProperties from '../utils/filter-schema';
|
||||
import {Api, Payload} from '../types';
|
||||
import update = require('react-addons-update');
|
||||
import update from 'react-addons-update';
|
||||
import {isEffectiveApi, isApiOutdated} from '../utils/api';
|
||||
import {ScopedContext, IScopedContext} from '../Scoped';
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ import {
|
|||
} from '../utils/helper';
|
||||
import {Api, Payload, fetchOptions, Action} from '../types';
|
||||
import qs from 'qs';
|
||||
import pick = require('lodash/pick');
|
||||
import pick from 'lodash/pick';
|
||||
import {resolveVariableAndFilter} from '../utils/tpl-builtin';
|
||||
|
||||
class ServerError extends Error {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import {types, getEnv, flow, getRoot, detach} from 'mobx-state-tree';
|
||||
import debounce = require('lodash/debounce');
|
||||
import debounce from 'lodash/debounce';
|
||||
import {ServiceStore} from './service';
|
||||
import {FormItemStore, IFormItemStore, SFormItemStore} from './formItem';
|
||||
import {Api, fetchOptions, Payload} from '../types';
|
||||
|
@ -17,7 +17,7 @@ import {
|
|||
mapObject
|
||||
} from '../utils/helper';
|
||||
import {IComboStore} from './combo';
|
||||
import isEqual = require('lodash/isEqual');
|
||||
import isEqual from 'lodash/isEqual';
|
||||
import {IRendererStore} from '.';
|
||||
|
||||
export const FormStore = ServiceStore.named('FormStore')
|
||||
|
|
|
@ -11,7 +11,7 @@ import {str2rules, validate as doValidate} from '../utils/validations';
|
|||
import {Api, Payload, fetchOptions} from '../types';
|
||||
import {ComboStore, IComboStore, IUniqueGroup} from './combo';
|
||||
import {evalExpression} from '../utils/tpl';
|
||||
import findIndex = require('lodash/findIndex');
|
||||
import findIndex from 'lodash/findIndex';
|
||||
import {
|
||||
isArrayChildrenModified,
|
||||
isObject,
|
||||
|
@ -22,9 +22,9 @@ import {
|
|||
import {flattenTree} from '../utils/helper';
|
||||
import {IRendererStore} from '.';
|
||||
import {normalizeOptions, optionValueCompare} from '../components/Select';
|
||||
import find = require('lodash/find');
|
||||
import find from 'lodash/find';
|
||||
import {SimpleMap} from '../utils/SimpleMap';
|
||||
import memoize = require('lodash/memoize');
|
||||
import memoize from 'lodash/memoize';
|
||||
|
||||
interface IOption {
|
||||
value?: string | number | null;
|
||||
|
|
|
@ -7,8 +7,8 @@ import {
|
|||
getRoot
|
||||
} from 'mobx-state-tree';
|
||||
import {iRendererStore} from './iRenderer';
|
||||
import isEqual = require('lodash/isEqual');
|
||||
import find = require('lodash/find');
|
||||
import isEqual from 'lodash/isEqual';
|
||||
import find from 'lodash/find';
|
||||
import {createObject, isObject, guid} from '../utils/helper';
|
||||
import {evalExpression} from '../utils/tpl';
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@ import {
|
|||
} from 'mobx-state-tree';
|
||||
import {iRendererStore} from './iRenderer';
|
||||
import {resolveVariable} from '../utils/tpl-builtin';
|
||||
import isEqual = require('lodash/isEqual');
|
||||
import find = require('lodash/find');
|
||||
import isEqual from 'lodash/isEqual';
|
||||
import find from 'lodash/find';
|
||||
import {
|
||||
isBreakpoint,
|
||||
createObject,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// 主题管理
|
||||
import cx from 'classnames';
|
||||
import React from 'react';
|
||||
import hoistNonReactStatic = require('hoist-non-react-statics');
|
||||
import hoistNonReactStatic from 'hoist-non-react-statics';
|
||||
import {ExtractProps, Omit} from './types';
|
||||
|
||||
export type ClassValue =
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import find = require('lodash/find');
|
||||
import findIndex = require('lodash/findIndex');
|
||||
import find from 'lodash/find';
|
||||
import findIndex from 'lodash/findIndex';
|
||||
|
||||
export class SimpleMap<V = any, K = any> {
|
||||
private readonly list: Array<{
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import hoistNonReactStatic = require('hoist-non-react-statics');
|
||||
import domOwnerDocument = require('dom-helpers/ownerDocument');
|
||||
import css = require('dom-helpers/style/index');
|
||||
import getOffset = require('dom-helpers/query/offset');
|
||||
import getPosition = require('dom-helpers/query/position');
|
||||
import getScrollTop = require('dom-helpers/query/scrollTop');
|
||||
import hoistNonReactStatic from 'hoist-non-react-statics';
|
||||
import domOwnerDocument from 'dom-helpers/ownerDocument';
|
||||
import css from 'dom-helpers/style/index';
|
||||
import getOffset from 'dom-helpers/query/offset';
|
||||
import getPosition from 'dom-helpers/query/position';
|
||||
import getScrollTop from 'dom-helpers/query/scrollTop';
|
||||
|
||||
const bsMapping: {
|
||||
[propName: string]: string;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import isPlainObject = require('lodash/isPlainObject');
|
||||
import transform = require('lodash/transform');
|
||||
import isEqual = require('lodash/isEqual');
|
||||
import lodashIsObject = require('lodash/isObject');
|
||||
import uniq = require('lodash/uniq');
|
||||
import isPlainObject from 'lodash/isPlainObject';
|
||||
import transform from 'lodash/transform';
|
||||
import isEqual from 'lodash/isEqual';
|
||||
import lodashIsObject from 'lodash/isObject';
|
||||
import uniq from 'lodash/uniq';
|
||||
import {Schema, PlainObject, FunctionPropertyNames} from '../types';
|
||||
import {evalExpression} from './tpl';
|
||||
import {boundMethod} from 'autobind-decorator';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import {reigsterTplEnginer, filter} from './tpl';
|
||||
import moment from 'moment';
|
||||
import {PlainObject} from '../types';
|
||||
import isPlainObject = require('lodash/isPlainObject');
|
||||
import isPlainObject from 'lodash/isPlainObject';
|
||||
import {createObject, isObject, setVariable, qsstringify} from './helper';
|
||||
|
||||
const UNITS = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import {reigsterTplEnginer, filter} from './tpl';
|
||||
import template = require('lodash/template');
|
||||
import template from 'lodash/template';
|
||||
import {getFilters} from './tpl-builtin';
|
||||
import React from 'react';
|
||||
import moment from 'moment';
|
||||
|
|
Loading…
Reference in New Issue