chore: 规范引入方式,兼容vite启动 (#5636)

This commit is contained in:
qinhaoyan 2022-10-26 19:26:41 +08:00 committed by GitHub
parent 9d1516be0f
commit 2114964b0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 57 additions and 43 deletions

View File

@ -23,7 +23,7 @@ import {ThemeProps} from './theme';
import find from 'lodash/find';
import {LocaleProps} from './locale';
import {HocStoreFactory} from './WithStore';
import {RendererEnv} from './env';
import type {RendererEnv} from './env';
import {OnEventProps} from './utils/renderer-event';
import {Placeholder} from './renderers/Placeholder';

View File

@ -15,14 +15,12 @@ import {
filterSchema,
clearStoresCache,
updateEnv,
RenderOptions,
stores,
defaultOptions,
addSchemaFilter,
RendererProps,
extendDefaultEnv,
RendererConfig
extendDefaultEnv
} from './factory';
import type {RenderOptions, RendererConfig, RendererProps} from './factory';
import './renderers/builtin';
export * from './utils/index';
export * from './types';
@ -37,12 +35,12 @@ import {
makeTranslator,
register as registerLocale,
extendLocale,
localeable,
LocaleProps,
TranslateFn
localeable
} from './locale';
import type {LocaleProps, TranslateFn} from './locale';
import Scoped, {IScopedContext, ScopedContext} from './Scoped';
import Scoped, {ScopedContext} from './Scoped';
import type {IScopedContext} from './Scoped';
import {
classnames,
@ -50,48 +48,48 @@ import {
setDefaultTheme,
theme,
getTheme,
ThemeProps,
themeable,
ClassNamesFn,
makeClassnames
} from './theme';
import type {ClassNamesFn, ThemeProps} from './theme';
const classPrefix = getClassPrefix();
export * from './actions';
import FormItem, {
FormBaseControl,
FormControlProps,
FormItemWrap,
FormItemProps,
registerFormItem,
getFormItemByName
} from './renderers/Item';
import {
FormOptionsControl,
OptionsControl,
OptionsControlProps,
registerOptionsControl
} from './renderers/Options';
import type {
FormBaseControl,
FormControlProps,
FormItemProps
} from './renderers/Item';
import {OptionsControl, registerOptionsControl} from './renderers/Options';
import type {OptionsControlProps} from './renderers/Options';
import type {FormOptionsControl} from './renderers/Options';
import {Schema} from './types';
import ScopedRootRenderer, {addRootWrapper, RootRenderProps} from './Root';
import {envOverwrite} from './envOverwrite';
import {EnvContext, RendererEnv} from './env';
import {EnvContext} from './env';
import type {RendererEnv} from './env';
import React from 'react';
import {
evaluate,
Evaluator,
extendsFilters,
FilterContext,
filters,
getFilters,
lexer,
parse,
registerFilter
} from 'amis-formula';
import type {FilterContext} from 'amis-formula';
import LazyComponent from './components/LazyComponent';
import Overlay from './components/Overlay';
import PopOver from './components/PopOver';
import {FormHorizontal, FormRenderer} from './renderers/Form';
import {FormRenderer} from './renderers/Form';
import type {FormHorizontal} from './renderers/Form';
import {enableDebug, promisify, replaceText, wrapFetcher} from './utils/index';
export {

View File

@ -53,7 +53,7 @@ import findIndex from 'lodash/findIndex';
import isPlainObject from 'lodash/isPlainObject';
import {normalizeOptions} from '../utils/normalizeOptions';
import {optionValueCompare} from '../utils/optionValueCompare';
import {Option} from '../types';
import type {Option} from '../types';
import isEqual from 'lodash/isEqual';
import {resolveEventData} from '../utils';

View File

@ -6,22 +6,35 @@ import {
isAlive,
Instance
} from 'mobx-state-tree';
import {iRendererStore, IIRendererStore, SIRendererStore} from './iRenderer';
import {IServiceStore, ServiceStore} from './service';
import {ComboStore, IComboStore} from './combo';
import {FormStore, IFormStore} from './form';
import {CRUDStore, ICRUDStore} from './crud';
import {IColumn, IRow, ITableStore, TableStore} from './table';
import {IColumn2, IRow2, ITableStore2, TableStore2} from './table2';
import {IListStore, ListStore} from './list';
import {IModalStore, ModalStore} from './modal';
import {iRendererStore, SIRendererStore} from './iRenderer';
import type {IIRendererStore} from './iRenderer';
import {ServiceStore} from './service';
import type {IServiceStore} from './service';
import {ComboStore} from './combo';
import type {IComboStore} from './combo';
import {FormStore} from './form';
import type {IFormStore} from './form';
import {CRUDStore} from './crud';
import type {ICRUDStore} from './crud';
import {TableStore} from './table';
import type {IColumn, IRow, ITableStore} from './table';
import {TableStore2} from './table2';
import type {IColumn2, IRow2, ITableStore2} from './table2';
import {ListStore} from './list';
import type {IListStore} from './list';
import {ModalStore} from './modal';
import type {IModalStore} from './modal';
import {TranslateFn} from '../locale';
import find from 'lodash/find';
import {IStoreNode, StoreNode} from './node';
import {FormItemStore, IFormItemStore} from './formItem';
import {StoreNode} from './node';
import type {IStoreNode} from './node';
import {FormItemStore} from './formItem';
import type {IFormItemStore} from './formItem';
import {addStore, getStoreById, getStores, removeStore} from './manager';
import {IPaginationStore, PaginationStore} from './pagination';
import {AppStore, IAppStore} from './app';
import {PaginationStore} from './pagination';
import type {IPaginationStore} from './pagination';
import {AppStore} from './app';
import type {IAppStore} from './app';
import {RootStore} from './root';
setLivelinessChecking(

View File

@ -72,17 +72,19 @@ import VariableList from './formula/VariableList';
import FormulaPicker from './formula/Picker';
import PickerContainer from './PickerContainer';
import InputJSONSchema from './json-schema';
import {Badge, BadgeObject, withBadge} from './Badge';
import {Badge, withBadge} from './Badge';
import type {BadgeObject} from './Badge';
import {getIcon, Icon, registerIcon} from './icons';
import {RemoteOptionsProps, withRemoteConfig} from './WithRemoteConfig';
import {withRemoteConfig} from './WithRemoteConfig';
import type {RemoteOptionsProps} from './WithRemoteConfig';
import ConditionBuilder from './condition-builder';
import {
import type {
ConditionBuilderFields,
ConditionBuilderFuncs
} from './condition-builder/types';
import {ConditionBuilderConfig} from './condition-builder/config';
import type {ConditionBuilderConfig} from './condition-builder/config';
import CityArea from './CityArea';
import {PresetColor} from './ColorPicker';
import type {PresetColor} from './ColorPicker';
import ListMenu from './ListMenu';
import Input from './Input';
import JSONSchemaEditor from './schema-editor';
@ -97,7 +99,8 @@ import UserSelect from './UserSelect';
import UserTabSelect from './UserTabSelect';
import HeadCellDropDown from './table/HeadCellDropDown';
import Card from './Card';
import GridNav, {GridNavDirection, GridNavItem} from './GridNav';
import GridNav, {GridNavItem} from './GridNav';
import type {GridNavDirection} from './GridNav';
import Link from './Link';
import VirtualList from './virtual-list';
import {withStore} from './WithStore';