amis2/src/index.tsx

248 lines
5.9 KiB
TypeScript
Raw Normal View History

2019-08-21 20:03:24 +08:00
/** @license amis v@version
*
* Copyright Baidu
*
* This source code is licensed under the Apache license found in the
* LICENSE file in the root directory of this source tree.
2019-04-30 11:11:25 +08:00
*/
import {render, Renderer, getRendererByName, resolveRenderer, filterSchema} from './factory';
import {wrapFetcher, buildApi} from './utils/api';
2019-09-09 00:53:39 +08:00
import {filter, reigsterTplEnginer, evalExpression} from './utils/tpl';
2019-04-30 11:11:25 +08:00
import './utils/tpl-builtin';
import './utils/tpl-lodash';
2019-06-11 10:14:18 +08:00
import * as utils from './utils/helper';
2019-04-30 11:11:25 +08:00
import {resizeSensor} from './utils/resize-sensor';
2019-09-02 18:22:30 +08:00
import {setIconVendor} from './renderers/Form/IconPickerIcons';
2019-09-02 19:12:05 +08:00
import {Icon, registerIcon} from './components/icons';
2019-04-30 11:11:25 +08:00
import {
NotFound,
AlertComponent,
alert,
2019-10-16 10:07:20 +08:00
Alert2,
2019-04-30 11:11:25 +08:00
confirm,
AsideNav,
Button,
Checkbox,
Checkboxes,
Collapse,
ColorPicker,
DatePicker,
DateRangePicker,
Drawer,
2019-08-09 14:01:33 +08:00
Tabs,
Tab,
2019-04-30 11:11:25 +08:00
// Editor,
Icons,
Html,
Layout,
LazyComponent,
Modal,
Overlay,
PopOver,
Radios,
Range,
Rating,
// RichText,
Select,
Spinner,
Switch,
Textarea,
TitleBar,
ToastComponent,
toast,
Tooltip,
TooltipWrapper,
Tree
} from './components/index';
// 注册渲染器
import './renderers/Action';
import './renderers/Alert';
import './renderers/Remark';
import './renderers/ButtonGroup';
import './renderers/ButtonToolbar';
import './renderers/DropDownButton';
import './renderers/Collapse';
import './renderers/CRUD';
import './renderers/Pagination';
import './renderers/Cards';
import './renderers/Card';
import './renderers/Date';
import './renderers/Dialog';
import './renderers/Divider';
import './renderers/Each';
import './renderers/Form/index';
import './renderers/Form/Control';
import './renderers/Form/Hidden';
import './renderers/Form/Text';
import './renderers/Form/Tag';
import './renderers/Form/Number';
import './renderers/Form/Textarea';
import './renderers/Form/Checkboxes';
import './renderers/Form/Checkbox';
2019-05-23 16:08:43 +08:00
import './renderers/Form/City';
2019-04-30 11:11:25 +08:00
import './renderers/Form/Rating';
import './renderers/Form/Switch';
import './renderers/Form/Button';
import './renderers/Form/ButtonGroup';
import './renderers/Form/ButtonToolbar';
import './renderers/Form/Radios';
import './renderers/Form/List';
import './renderers/Form/Select';
import './renderers/Form/Static';
import './renderers/Form/Date';
import './renderers/Form/DateRange';
import './renderers/Form/Repeat';
import './renderers/Form/Tree';
import './renderers/Form/TreeSelect';
import './renderers/Form/Image';
import './renderers/Form/File';
import './renderers/Form/Matrix';
import './renderers/Form/Range';
import './renderers/Form/Array';
import './renderers/Form/Combo';
import './renderers/Form/Container';
import './renderers/Form/SubForm';
import './renderers/Form/RichText';
import './renderers/Form/Editor';
import './renderers/Form/DiffEditor';
import './renderers/Form/Grid';
import './renderers/Form/HBox';
import './renderers/Form/Panel';
import './renderers/Form/Color';
import './renderers/Form/ChainedSelect';
import './renderers/Form/NestedSelect';
import './renderers/Form/TransferSelect';
import './renderers/Form/Service';
import './renderers/Form/Table';
import './renderers/Form/Picker';
import './renderers/Form/IconPicker';
import './renderers/Form/Formula';
import './renderers/Form/FieldSet';
import './renderers/Form/Tabs';
import './renderers/Form/Group';
import './renderers/Form/InputGroup';
import './renderers/Grid';
import './renderers/HBox';
import './renderers/VBox';
import './renderers/Image';
import './renderers/List';
import './renderers/Operation';
import './renderers/Page';
import './renderers/Panel';
import './renderers/Plain';
import './renderers/Spinner';
import './renderers/Table';
import './renderers/Tabs';
import './renderers/Tpl';
import './renderers/Mapping';
import './renderers/Progress';
import './renderers/Status';
import './renderers/Json';
import './renderers/Link';
import './renderers/Switch';
import './renderers/Wizard';
import './renderers/Chart';
import './renderers/Container';
import './renderers/Service';
import './renderers/Video';
2019-05-05 10:49:20 +08:00
import './renderers/Audio';
2019-04-30 11:11:25 +08:00
import './renderers/Nav';
import './renderers/Tasks';
import './renderers/Drawer';
import './renderers/Wrapper';
import './renderers/IFrame';
import './renderers/QRCode';
import './renderers/Icon';
2019-05-16 11:04:55 +08:00
import './renderers/Carousel';
import Scoped, {ScopedContext} from './Scoped';
2019-04-30 11:11:25 +08:00
2019-09-09 00:53:39 +08:00
import {FormItem} from './renderers/Form/Item';
2019-04-30 11:11:25 +08:00
// 兼容旧版本用法
import './compat';
2019-08-22 19:54:03 +08:00
import './themes/default';
2019-04-30 11:11:25 +08:00
import './themes/cxd';
2019-09-09 00:53:39 +08:00
import './themes/dark';
import {registerFilter, filterDate, relativeValueRe, resolveVariable} from './utils/tpl-builtin';
import {addRule, str2rules} from './utils/validations';
import {normalizeOptions} from './components/Select';
import {OptionsControl} from './renderers/Form/Options';
2019-04-30 11:11:25 +08:00
2019-08-22 19:54:03 +08:00
import {classnames, getClassPrefix, setDefaultTheme} from './theme';
const classPrefix = getClassPrefix();
2019-04-30 11:11:25 +08:00
export {
render,
Renderer,
FormItem,
OptionsControl,
wrapFetcher,
buildApi,
filter,
NotFound,
AlertComponent,
alert,
2019-10-16 10:07:20 +08:00
Alert2,
2019-04-30 11:11:25 +08:00
confirm,
AsideNav,
Button,
Checkbox,
Checkboxes,
Collapse,
ColorPicker,
DatePicker,
DateRangePicker,
Drawer,
2019-08-09 14:01:33 +08:00
Tabs,
Tab,
2019-04-30 11:11:25 +08:00
// Editor,
Html,
Icons,
Layout,
LazyComponent,
Modal,
Overlay,
PopOver,
Radios,
Range,
Rating,
// RichText,
Select,
Spinner,
Switch,
Textarea,
TitleBar,
ToastComponent,
toast,
Tooltip,
TooltipWrapper,
Tree,
// 其他功能类方法
utils,
resizeSensor,
registerFilter,
reigsterTplEnginer,
2019-09-05 14:47:28 +08:00
evalExpression,
2019-04-30 11:11:25 +08:00
addRule,
str2rules,
normalizeOptions,
getRendererByName,
resolveRenderer,
filterSchema,
filterDate,
relativeValueRe,
resolveVariable,
setIconVendor,
2019-09-02 19:12:05 +08:00
Icon,
registerIcon,
Scoped,
ScopedContext,
2019-08-22 19:54:03 +08:00
setDefaultTheme,
2019-04-30 11:11:25 +08:00
classPrefix,
2019-08-22 19:54:03 +08:00
getClassPrefix,
2019-04-30 11:11:25 +08:00
classnames
};