Commit 21576b25 authored by xiaohuoni's avatar xiaohuoni

Merge branch 'master' of https://github.com/ant-design/ant-design-pro into Conventional-Routing

# Conflicts:
#	package.json
#	src/models/menu.js
parents f8ca7d2f 7679507b
/functions/mock/** /lambda/mock/**
/scripts /scripts
/config /config
...@@ -34,6 +34,6 @@ module.exports = { ...@@ -34,6 +34,6 @@ module.exports = {
'linebreak-style': 0, 'linebreak-style': 0,
}, },
settings: { settings: {
polyfills: ['fetch', 'promises', 'url'], polyfills: ['fetch', 'promises', 'url', 'object-assign'],
}, },
}; };
{
"projects": {
"default": "antd-pro"
}
}
...@@ -25,8 +25,8 @@ package-lock.json ...@@ -25,8 +25,8 @@ package-lock.json
# visual studio code # visual studio code
.history .history
*.log *.log
functions/*
functions/mock lambda/mock/index.js
.temp/** .temp/**
# umi # umi
......
English | [简体中文](./README.zh-CN.md) | [Русский](./README.ru-RU.md) English | [简体中文](./README.zh-CN.md) | [Русский](./README.ru-RU.md) | [Türkçe](./README.tr-TR.md)
<h1 align="center">Ant Design Pro</h1> <h1 align="center">Ant Design Pro</h1>
...@@ -12,7 +12,7 @@ An out-of-box UI solution for enterprise applications as a React boilerplate. ...@@ -12,7 +12,7 @@ An out-of-box UI solution for enterprise applications as a React boilerplate.
[![DevDependencies](https://img.shields.io/david/dev/ant-design/ant-design-pro.svg)](https://david-dm.org/ant-design/ant-design-pro?type=dev) [![DevDependencies](https://img.shields.io/david/dev/ant-design/ant-design-pro.svg)](https://david-dm.org/ant-design/ant-design-pro?type=dev)
[![Gitter](https://img.shields.io/gitter/room/ant-design/pro-english.svg?style=flat-square&logoWidth=20&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgd2lkdGg9IjEyMzUiIGhlaWdodD0iNjUwIiB2aWV3Qm94PSIwIDAgNzQxMCAzOTAwIj4NCjxyZWN0IHdpZHRoPSI3NDEwIiBoZWlnaHQ9IjM5MDAiIGZpbGw9IiNiMjIyMzQiLz4NCjxwYXRoIGQ9Ik0wLDQ1MEg3NDEwbTAsNjAwSDBtMCw2MDBINzQxMG0wLDYwMEgwbTAsNjAwSDc0MTBtMCw2MDBIMCIgc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjMwMCIvPg0KPHJlY3Qgd2lkdGg9IjI5NjQiIGhlaWdodD0iMjEwMCIgZmlsbD0iIzNjM2I2ZSIvPg0KPGcgZmlsbD0iI2ZmZiI%2BDQo8ZyBpZD0iczE4Ij4NCjxnIGlkPSJzOSI%2BDQo8ZyBpZD0iczUiPg0KPGcgaWQ9InM0Ij4NCjxwYXRoIGlkPSJzIiBkPSJNMjQ3LDkwIDMxNy41MzQyMzAsMzA3LjA4MjAzOSAxMzIuODczMjE4LDE3Mi45MTc5NjFIMzYxLjEyNjc4MkwxNzYuNDY1NzcwLDMwNy4wODIwMzl6Ii8%2BDQo8dXNlIHhsaW5rOmhyZWY9IiNzIiB5PSI0MjAiLz4NCjx1c2UgeGxpbms6aHJlZj0iI3MiIHk9Ijg0MCIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgeT0iMTI2MCIvPg0KPC9nPg0KPHVzZSB4bGluazpocmVmPSIjcyIgeT0iMTY4MCIvPg0KPC9nPg0KPHVzZSB4bGluazpocmVmPSIjczQiIHg9IjI0NyIgeT0iMjEwIi8%2BDQo8L2c%2BDQo8dXNlIHhsaW5rOmhyZWY9IiNzOSIgeD0iNDk0Ii8%2BDQo8L2c%2BDQo8dXNlIHhsaW5rOmhyZWY9IiNzMTgiIHg9Ijk4OCIvPg0KPHVzZSB4bGluazpocmVmPSIjczkiIHg9IjE5NzYiLz4NCjx1c2UgeGxpbms6aHJlZj0iI3M1IiB4PSIyNDcwIi8%2BDQo8L2c%2BDQo8L3N2Zz4%3D)](https://gitter.im/ant-design/pro-english?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Gitter](https://img.shields.io/gitter/room/ant-design/pro-english.svg?style=flat-square&logoWidth=20&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgd2lkdGg9IjEyMzUiIGhlaWdodD0iNjUwIiB2aWV3Qm94PSIwIDAgNzQxMCAzOTAwIj4NCjxyZWN0IHdpZHRoPSI3NDEwIiBoZWlnaHQ9IjM5MDAiIGZpbGw9IiNiMjIyMzQiLz4NCjxwYXRoIGQ9Ik0wLDQ1MEg3NDEwbTAsNjAwSDBtMCw2MDBINzQxMG0wLDYwMEgwbTAsNjAwSDc0MTBtMCw2MDBIMCIgc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjMwMCIvPg0KPHJlY3Qgd2lkdGg9IjI5NjQiIGhlaWdodD0iMjEwMCIgZmlsbD0iIzNjM2I2ZSIvPg0KPGcgZmlsbD0iI2ZmZiI%2BDQo8ZyBpZD0iczE4Ij4NCjxnIGlkPSJzOSI%2BDQo8ZyBpZD0iczUiPg0KPGcgaWQ9InM0Ij4NCjxwYXRoIGlkPSJzIiBkPSJNMjQ3LDkwIDMxNy41MzQyMzAsMzA3LjA4MjAzOSAxMzIuODczMjE4LDE3Mi45MTc5NjFIMzYxLjEyNjc4MkwxNzYuNDY1NzcwLDMwNy4wODIwMzl6Ii8%2BDQo8dXNlIHhsaW5rOmhyZWY9IiNzIiB5PSI0MjAiLz4NCjx1c2UgeGxpbms6aHJlZj0iI3MiIHk9Ijg0MCIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgeT0iMTI2MCIvPg0KPC9nPg0KPHVzZSB4bGluazpocmVmPSIjcyIgeT0iMTY4MCIvPg0KPC9nPg0KPHVzZSB4bGluazpocmVmPSIjczQiIHg9IjI0NyIgeT0iMjEwIi8%2BDQo8L2c%2BDQo8dXNlIHhsaW5rOmhyZWY9IiNzOSIgeD0iNDk0Ii8%2BDQo8L2c%2BDQo8dXNlIHhsaW5rOmhyZWY9IiNzMTgiIHg9Ijk4OCIvPg0KPHVzZSB4bGluazpocmVmPSIjczkiIHg9IjE5NzYiLz4NCjx1c2UgeGxpbms6aHJlZj0iI3M1IiB4PSIyNDcwIi8%2BDQo8L2c%2BDQo8L3N2Zz4%3D)](https://gitter.im/ant-design/pro-english?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Join the chat at https://gitter.im/ant-design/ant-design-pro](https://img.shields.io/gitter/room/ant-design/ant-design-pro.svg?style=flat-square&logoWidth=20&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgd2lkdGg9IjkwMCIgaGVpZ2h0PSI2MDAiIHZpZXdCb3g9IjAgMCAzMCAyMCI%2BDQo8ZGVmcz4NCjxwYXRoIGlkPSJzIiBkPSJNMCwtMSAwLjU4Nzc4NSwwLjgwOTAxNyAtMC45NTEwNTcsLTAuMzA5MDE3SDAuOTUxMDU3TC0wLjU4Nzc4NSwwLjgwOTAxN3oiIGZpbGw9IiNmZmRlMDAiLz4NCjwvZGVmcz4NCjxyZWN0IHdpZHRoPSIzMCIgaGVpZ2h0PSIyMCIgZmlsbD0iI2RlMjkxMCIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNSw1KSBzY2FsZSgzKSIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAsMikgcm90YXRlKDIzLjAzNjI0MykiLz4NCjx1c2UgeGxpbms6aHJlZj0iI3MiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEyLDQpIHJvdGF0ZSg0NS44Njk4OTgpIi8%2BDQo8dXNlIHhsaW5rOmhyZWY9IiNzIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMiw3KSByb3RhdGUoNjkuOTQ1Mzk2KSIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAsOSkgcm90YXRlKDIwLjY1OTgwOCkiLz4NCjwvc3ZnPg%3D%3D)](https://gitter.im/ant-design/ant-design-pro?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Join the chat at https://gitter.im/ant-design/ant-design-pro](https://img.shields.io/gitter/room/ant-design/ant-design-pro.svg?style=flat-square&logoWidth=20&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgd2lkdGg9IjkwMCIgaGVpZ2h0PSI2MDAiIHZpZXdCb3g9IjAgMCAzMCAyMCI%2BDQo8ZGVmcz4NCjxwYXRoIGlkPSJzIiBkPSJNMCwtMSAwLjU4Nzc4NSwwLjgwOTAxNyAtMC45NTEwNTcsLTAuMzA5MDE3SDAuOTUxMDU3TC0wLjU4Nzc4NSwwLjgwOTAxN3oiIGZpbGw9IiNmZmRlMDAiLz4NCjwvZGVmcz4NCjxyZWN0IHdpZHRoPSIzMCIgaGVpZ2h0PSIyMCIgZmlsbD0iI2RlMjkxMCIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNSw1KSBzY2FsZSgzKSIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAsMikgcm90YXRlKDIzLjAzNjI0MykiLz4NCjx1c2UgeGxpbms6aHJlZj0iI3MiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEyLDQpIHJvdGF0ZSg0NS44Njk4OTgpIi8%2BDQo8dXNlIHhsaW5rOmhyZWY9IiNzIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMiw3KSByb3RhdGUoNjkuOTQ1Mzk2KSIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAsOSkgcm90YXRlKDIwLjY1OTgwOCkiLz4NCjwvc3ZnPg%3D%3D)](https://gitter.im/ant-design/ant-design-pro?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Netlify Status](https://api.netlify.com/api/v1/badges/b68e9850-a529-4364-9d3b-d70aade560f9/deploy-status)](https://app.netlify.com/sites/ant-design-pro/deploys)
![](https://user-images.githubusercontent.com/8186664/44953195-581e3d80-aec4-11e8-8dcb-54b9db38ec11.png) ![](https://user-images.githubusercontent.com/8186664/44953195-581e3d80-aec4-11e8-8dcb-54b9db38ec11.png)
</div> </div>
......
[English](./README.md) | [简体中文](./README.zh-CN.md) | Русский [English](./README.md) | [简体中文](./README.zh-CN.md) | Русский | [Türkçe](./README.tr-TR.md)
<h1 align="center">Ant Design Pro</h1> <h1 align="center">Ant Design Pro</h1>
...@@ -12,7 +12,7 @@ UI-решение "из коробки" для корпоративных при ...@@ -12,7 +12,7 @@ UI-решение "из коробки" для корпоративных при
[![DevDependencies](https://img.shields.io/david/dev/ant-design/ant-design-pro.svg)](https://david-dm.org/ant-design/ant-design-pro?type=dev) [![DevDependencies](https://img.shields.io/david/dev/ant-design/ant-design-pro.svg)](https://david-dm.org/ant-design/ant-design-pro?type=dev)
[![Gitter](https://img.shields.io/gitter/room/ant-design/pro-english.svg?style=flat-square&logoWidth=20&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgd2lkdGg9IjEyMzUiIGhlaWdodD0iNjUwIiB2aWV3Qm94PSIwIDAgNzQxMCAzOTAwIj4NCjxyZWN0IHdpZHRoPSI3NDEwIiBoZWlnaHQ9IjM5MDAiIGZpbGw9IiNiMjIyMzQiLz4NCjxwYXRoIGQ9Ik0wLDQ1MEg3NDEwbTAsNjAwSDBtMCw2MDBINzQxMG0wLDYwMEgwbTAsNjAwSDc0MTBtMCw2MDBIMCIgc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjMwMCIvPg0KPHJlY3Qgd2lkdGg9IjI5NjQiIGhlaWdodD0iMjEwMCIgZmlsbD0iIzNjM2I2ZSIvPg0KPGcgZmlsbD0iI2ZmZiI%2BDQo8ZyBpZD0iczE4Ij4NCjxnIGlkPSJzOSI%2BDQo8ZyBpZD0iczUiPg0KPGcgaWQ9InM0Ij4NCjxwYXRoIGlkPSJzIiBkPSJNMjQ3LDkwIDMxNy41MzQyMzAsMzA3LjA4MjAzOSAxMzIuODczMjE4LDE3Mi45MTc5NjFIMzYxLjEyNjc4MkwxNzYuNDY1NzcwLDMwNy4wODIwMzl6Ii8%2BDQo8dXNlIHhsaW5rOmhyZWY9IiNzIiB5PSI0MjAiLz4NCjx1c2UgeGxpbms6aHJlZj0iI3MiIHk9Ijg0MCIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgeT0iMTI2MCIvPg0KPC9nPg0KPHVzZSB4bGluazpocmVmPSIjcyIgeT0iMTY4MCIvPg0KPC9nPg0KPHVzZSB4bGluazpocmVmPSIjczQiIHg9IjI0NyIgeT0iMjEwIi8%2BDQo8L2c%2BDQo8dXNlIHhsaW5rOmhyZWY9IiNzOSIgeD0iNDk0Ii8%2BDQo8L2c%2BDQo8dXNlIHhsaW5rOmhyZWY9IiNzMTgiIHg9Ijk4OCIvPg0KPHVzZSB4bGluazpocmVmPSIjczkiIHg9IjE5NzYiLz4NCjx1c2UgeGxpbms6aHJlZj0iI3M1IiB4PSIyNDcwIi8%2BDQo8L2c%2BDQo8L3N2Zz4%3D)](https://gitter.im/ant-design/pro-english?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Gitter](https://img.shields.io/gitter/room/ant-design/pro-english.svg?style=flat-square&logoWidth=20&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgd2lkdGg9IjEyMzUiIGhlaWdodD0iNjUwIiB2aWV3Qm94PSIwIDAgNzQxMCAzOTAwIj4NCjxyZWN0IHdpZHRoPSI3NDEwIiBoZWlnaHQ9IjM5MDAiIGZpbGw9IiNiMjIyMzQiLz4NCjxwYXRoIGQ9Ik0wLDQ1MEg3NDEwbTAsNjAwSDBtMCw2MDBINzQxMG0wLDYwMEgwbTAsNjAwSDc0MTBtMCw2MDBIMCIgc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjMwMCIvPg0KPHJlY3Qgd2lkdGg9IjI5NjQiIGhlaWdodD0iMjEwMCIgZmlsbD0iIzNjM2I2ZSIvPg0KPGcgZmlsbD0iI2ZmZiI%2BDQo8ZyBpZD0iczE4Ij4NCjxnIGlkPSJzOSI%2BDQo8ZyBpZD0iczUiPg0KPGcgaWQ9InM0Ij4NCjxwYXRoIGlkPSJzIiBkPSJNMjQ3LDkwIDMxNy41MzQyMzAsMzA3LjA4MjAzOSAxMzIuODczMjE4LDE3Mi45MTc5NjFIMzYxLjEyNjc4MkwxNzYuNDY1NzcwLDMwNy4wODIwMzl6Ii8%2BDQo8dXNlIHhsaW5rOmhyZWY9IiNzIiB5PSI0MjAiLz4NCjx1c2UgeGxpbms6aHJlZj0iI3MiIHk9Ijg0MCIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgeT0iMTI2MCIvPg0KPC9nPg0KPHVzZSB4bGluazpocmVmPSIjcyIgeT0iMTY4MCIvPg0KPC9nPg0KPHVzZSB4bGluazpocmVmPSIjczQiIHg9IjI0NyIgeT0iMjEwIi8%2BDQo8L2c%2BDQo8dXNlIHhsaW5rOmhyZWY9IiNzOSIgeD0iNDk0Ii8%2BDQo8L2c%2BDQo8dXNlIHhsaW5rOmhyZWY9IiNzMTgiIHg9Ijk4OCIvPg0KPHVzZSB4bGluazpocmVmPSIjczkiIHg9IjE5NzYiLz4NCjx1c2UgeGxpbms6aHJlZj0iI3M1IiB4PSIyNDcwIi8%2BDQo8L2c%2BDQo8L3N2Zz4%3D)](https://gitter.im/ant-design/pro-english?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Join the chat at https://gitter.im/ant-design/ant-design-pro](https://img.shields.io/gitter/room/ant-design/ant-design-pro.svg?style=flat-square&logoWidth=20&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgd2lkdGg9IjkwMCIgaGVpZ2h0PSI2MDAiIHZpZXdCb3g9IjAgMCAzMCAyMCI%2BDQo8ZGVmcz4NCjxwYXRoIGlkPSJzIiBkPSJNMCwtMSAwLjU4Nzc4NSwwLjgwOTAxNyAtMC45NTEwNTcsLTAuMzA5MDE3SDAuOTUxMDU3TC0wLjU4Nzc4NSwwLjgwOTAxN3oiIGZpbGw9IiNmZmRlMDAiLz4NCjwvZGVmcz4NCjxyZWN0IHdpZHRoPSIzMCIgaGVpZ2h0PSIyMCIgZmlsbD0iI2RlMjkxMCIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNSw1KSBzY2FsZSgzKSIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAsMikgcm90YXRlKDIzLjAzNjI0MykiLz4NCjx1c2UgeGxpbms6aHJlZj0iI3MiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEyLDQpIHJvdGF0ZSg0NS44Njk4OTgpIi8%2BDQo8dXNlIHhsaW5rOmhyZWY9IiNzIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMiw3KSByb3RhdGUoNjkuOTQ1Mzk2KSIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAsOSkgcm90YXRlKDIwLjY1OTgwOCkiLz4NCjwvc3ZnPg%3D%3D)](https://gitter.im/ant-design/ant-design-pro?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Join the chat at https://gitter.im/ant-design/ant-design-pro](https://img.shields.io/gitter/room/ant-design/ant-design-pro.svg?style=flat-square&logoWidth=20&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgd2lkdGg9IjkwMCIgaGVpZ2h0PSI2MDAiIHZpZXdCb3g9IjAgMCAzMCAyMCI%2BDQo8ZGVmcz4NCjxwYXRoIGlkPSJzIiBkPSJNMCwtMSAwLjU4Nzc4NSwwLjgwOTAxNyAtMC45NTEwNTcsLTAuMzA5MDE3SDAuOTUxMDU3TC0wLjU4Nzc4NSwwLjgwOTAxN3oiIGZpbGw9IiNmZmRlMDAiLz4NCjwvZGVmcz4NCjxyZWN0IHdpZHRoPSIzMCIgaGVpZ2h0PSIyMCIgZmlsbD0iI2RlMjkxMCIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNSw1KSBzY2FsZSgzKSIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAsMikgcm90YXRlKDIzLjAzNjI0MykiLz4NCjx1c2UgeGxpbms6aHJlZj0iI3MiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEyLDQpIHJvdGF0ZSg0NS44Njk4OTgpIi8%2BDQo8dXNlIHhsaW5rOmhyZWY9IiNzIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMiw3KSByb3RhdGUoNjkuOTQ1Mzk2KSIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAsOSkgcm90YXRlKDIwLjY1OTgwOCkiLz4NCjwvc3ZnPg%3D%3D)](https://gitter.im/ant-design/ant-design-pro?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Netlify Status](https://api.netlify.com/api/v1/badges/b68e9850-a529-4364-9d3b-d70aade560f9/deploy-status)](https://app.netlify.com/sites/ant-design-pro/deploys)
![](https://user-images.githubusercontent.com/8186664/44953195-581e3d80-aec4-11e8-8dcb-54b9db38ec11.png) ![](https://user-images.githubusercontent.com/8186664/44953195-581e3d80-aec4-11e8-8dcb-54b9db38ec11.png)
</div> </div>
......
[English](./README.md) | [简体中文](./README.zh-CN.md) | [Русский](./README.ru-RU.md) | Türkçe
<h1 align="center">Ant Design Pro</h1>
<div align="center">
React ile kurumsal uygulamalar için taslak olarak geliştirilmiş kullanıma hazır bir UI çözümü.
[![CircleCI Status](https://circleci.com/gh/ant-design/ant-design-pro.svg?style=svg)](https://circleci.com/gh/ant-design/ant-design-pro/)
[![Build status](https://ci.appveyor.com/api/projects/status/67fxu2by3ibvqtat/branch/master?svg=true)](https://ci.appveyor.com/project/afc163/ant-design-pro/branch/master)
[![Dependencies](https://img.shields.io/david/ant-design/ant-design-pro.svg)](https://david-dm.org/ant-design/ant-design-pro)
[![DevDependencies](https://img.shields.io/david/dev/ant-design/ant-design-pro.svg)](https://david-dm.org/ant-design/ant-design-pro?type=dev)
[![Gitter](https://img.shields.io/gitter/room/ant-design/pro-english.svg)](https://gitter.im/ant-design/pro-english?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)(🇺🇸)
[![Gitter](https://img.shields.io/gitter/room/ant-design/ant-design-pro.svg?style=flat-square)](https://gitter.im/ant-design/ant-design-pro?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)(🇨🇳)
[![Netlify Status](https://api.netlify.com/api/v1/badges/b68e9850-a529-4364-9d3b-d70aade560f9/deploy-status)](https://app.netlify.com/sites/ant-design-pro/deploys)
![](https://user-images.githubusercontent.com/8186664/44953195-581e3d80-aec4-11e8-8dcb-54b9db38ec11.png)
</div>
- Önizleme: http://preview.pro.ant.design
- Anasayfa: http://pro.ant.design
- Dokümantasyon: http://pro.ant.design/docs/getting-started
- ChangeLog: http://pro.ant.design/docs/changelog
- SSS: http://pro.ant.design/docs/faq
- Çinde barındırılan site: http://ant-design-pro.gitee.io
## 2.0 Versiyonu Şimdi Yayında! 🎉🎉🎉
[Announcing Ant Design Pro 2.0.0](https://medium.com/ant-design/beautiful-and-powerful-ant-design-pro-2-0-release-51358da5af95)
## Çeviri Desteği :loudspeaker:
Çeviriler için yardımınıza ihtiyacımız var: https://github.com/ant-design/ant-design-pro/issues/120
## Özellikler
- :gem: **Zarif Tasarım**: Buradan [Ant Design özellikleri](http://ant.design/)
- :triangular_ruler: **Ortak Şablonlar**: Kurumsal uygulamalar için şablonlar
- :rocket: **Sanatsal gelişim durumu**: Newest development stack of React/umi/dva/antd
- :iphone: **Responsive**: Değişken ekran boyutları için tasarlanmıştır
- :art: **Tema Kullanımı**: Basit ayarlar ile özelleştirilebilir tema
- :globe_with_meridians: **Uluslararası**: Built-in i18n solution
- :gear: **Best Practices**: İyi kod için sağlam iş akışı
- :1234: **Mock Geliştirme**: Model(Mock) geliştirmeler için kolay çözüm
- :white_check_mark: **UI Testi**: Unit ve e2e testleri ile güvenli sürdürülebilirlik
## Şablonlar
```
- Dashboard
- Analitik
- Monitör
- Çalışma alanı
- Form
- Basit Form
- Step Form
- Gelişmiş Form
- List
- Standard Tablo
- Standard Liste
- Kart Liste
- Arama Listesi (Project/Applications/Article)
- Profil
- Basit Profil
- Gelişmiş Profil
- Hesap
- Hesap Yönetimi
- Hesap Ayarları
- Sonuç
- Başarılı
- Hatalı
- Hatalar
- 403
- 404
- 500
- Kullanıcı
- Giriş
- Kayıt
- Kayıt Sonucu
```
## Kullanım
### bash ile kullanım
```bash
$ git clone https://github.com/ant-design/ant-design-pro.git --depth=1
$ cd ant-design-pro
$ npm install
$ npm start # visit http://localhost:8000
```
### Docker ile kullanım
```bash
# preview
$ docker pull chenshuai2144/ant-design-pro
$ docker run -p 80:80 chenshuai2144/ant-design-pro
# open http://localhost
# dev
$ npm run docker:dev
# build
$ npm run docker:build
# production dev
$ npm run docker-prod:dev
# production build
$ npm run docker-prod:build
```
Daha fazla talimat için [dokümantasyon](http://pro.ant.design/docs/getting-started) sayfasına göz atın.
## Tarayıcı desteği
Modern internet tarayıcıları ve IE11.
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Opera |
| --------- | --------- | --------- | --------- | --------- |
| IE11, Edge| son 2 versiyon | son 2 versiyon | son 2 versiyon | son 2 versiyon
## Destek
Her türlü desteğinize açığız, bu projeye nasıl katkıda bulunabileceğinize dair bazı örnekler:
- Günlük işinizde Ant Design Pro kullanın.
- Hataları bildirmek veya soru sormak için [issues](http://github.com/ant-design/ant-design-pro/issues) gönderin.
- kodumuzu geliştirmek için [pull requests](http://github.com/ant-design/ant-design-pro/pulls) gönderin.
[English](./README.md) | 简体中文 | [Русский](./README.ru-RU.md) [English](./README.md) | 简体中文 | [Русский](./README.ru-RU.md) | [Türkçe](./README.tr-TR.md)
<h1 align="center">Ant Design Pro</h1> <h1 align="center">Ant Design Pro</h1>
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
[![Dependencies](https://img.shields.io/david/ant-design/ant-design-pro.svg)](https://david-dm.org/ant-design/ant-design-pro) [![Dependencies](https://img.shields.io/david/ant-design/ant-design-pro.svg)](https://david-dm.org/ant-design/ant-design-pro)
[![DevDependencies](https://img.shields.io/david/dev/ant-design/ant-design-pro.svg)](https://david-dm.org/ant-design/ant-design-pro?type=dev) [![DevDependencies](https://img.shields.io/david/dev/ant-design/ant-design-pro.svg)](https://david-dm.org/ant-design/ant-design-pro?type=dev)
[![Join the chat at https://gitter.im/ant-design/ant-design-pro](https://img.shields.io/gitter/room/ant-design/ant-design-pro.svg?style=flat-square&logoWidth=20&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgd2lkdGg9IjkwMCIgaGVpZ2h0PSI2MDAiIHZpZXdCb3g9IjAgMCAzMCAyMCI%2BDQo8ZGVmcz4NCjxwYXRoIGlkPSJzIiBkPSJNMCwtMSAwLjU4Nzc4NSwwLjgwOTAxNyAtMC45NTEwNTcsLTAuMzA5MDE3SDAuOTUxMDU3TC0wLjU4Nzc4NSwwLjgwOTAxN3oiIGZpbGw9IiNmZmRlMDAiLz4NCjwvZGVmcz4NCjxyZWN0IHdpZHRoPSIzMCIgaGVpZ2h0PSIyMCIgZmlsbD0iI2RlMjkxMCIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNSw1KSBzY2FsZSgzKSIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAsMikgcm90YXRlKDIzLjAzNjI0MykiLz4NCjx1c2UgeGxpbms6aHJlZj0iI3MiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEyLDQpIHJvdGF0ZSg0NS44Njk4OTgpIi8%2BDQo8dXNlIHhsaW5rOmhyZWY9IiNzIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMiw3KSByb3RhdGUoNjkuOTQ1Mzk2KSIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAsOSkgcm90YXRlKDIwLjY1OTgwOCkiLz4NCjwvc3ZnPg%3D%3D)](https://gitter.im/ant-design/ant-design-pro?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Join the chat at https://gitter.im/ant-design/ant-design-pro](https://img.shields.io/gitter/room/ant-design/ant-design-pro.svg?style=flat-square&logoWidth=20&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgd2lkdGg9IjkwMCIgaGVpZ2h0PSI2MDAiIHZpZXdCb3g9IjAgMCAzMCAyMCI%2BDQo8ZGVmcz4NCjxwYXRoIGlkPSJzIiBkPSJNMCwtMSAwLjU4Nzc4NSwwLjgwOTAxNyAtMC45NTEwNTcsLTAuMzA5MDE3SDAuOTUxMDU3TC0wLjU4Nzc4NSwwLjgwOTAxN3oiIGZpbGw9IiNmZmRlMDAiLz4NCjwvZGVmcz4NCjxyZWN0IHdpZHRoPSIzMCIgaGVpZ2h0PSIyMCIgZmlsbD0iI2RlMjkxMCIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNSw1KSBzY2FsZSgzKSIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAsMikgcm90YXRlKDIzLjAzNjI0MykiLz4NCjx1c2UgeGxpbms6aHJlZj0iI3MiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEyLDQpIHJvdGF0ZSg0NS44Njk4OTgpIi8%2BDQo8dXNlIHhsaW5rOmhyZWY9IiNzIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMiw3KSByb3RhdGUoNjkuOTQ1Mzk2KSIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAsOSkgcm90YXRlKDIwLjY1OTgwOCkiLz4NCjwvc3ZnPg%3D%3D)](https://gitter.im/ant-design/ant-design-pro?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Netlify Status](https://api.netlify.com/api/v1/badges/b68e9850-a529-4364-9d3b-d70aade560f9/deploy-status)](https://app.netlify.com/sites/ant-design-pro/deploys)
![](https://user-images.githubusercontent.com/8186664/44953195-581e3d80-aec4-11e8-8dcb-54b9db38ec11.png) ![](https://user-images.githubusercontent.com/8186664/44953195-581e3d80-aec4-11e8-8dcb-54b9db38ec11.png)
</div> </div>
......
...@@ -52,6 +52,10 @@ jobs: ...@@ -52,6 +52,10 @@ jobs:
displayName: install displayName: install
- script: npm run lint - script: npm run lint
displayName: lint displayName: lint
- script: npm run test:all
env:
PROGRESS: none
displayName: test
- script: npm run build - script: npm run build
env: env:
PROGRESS: none PROGRESS: none
......
...@@ -5,7 +5,7 @@ import defaultSettings from '../src/defaultSettings'; ...@@ -5,7 +5,7 @@ import defaultSettings from '../src/defaultSettings';
import slash from 'slash2'; import slash from 'slash2';
const { pwa, primaryColor } = defaultSettings; const { pwa, primaryColor } = defaultSettings;
const { NODE_ENV, APP_TYPE, TEST } = process.env; const { APP_TYPE, TEST } = process.env;
const plugins = [ const plugins = [
[ [
...@@ -37,12 +37,12 @@ const plugins = [ ...@@ -37,12 +37,12 @@ const plugins = [
importWorkboxFrom: 'local', importWorkboxFrom: 'local',
}, },
} }
: {}, : false,
...(!TEST && os.platform() === 'darwin' ...(!TEST && os.platform() === 'darwin'
? { ? {
dll: { dll: {
include: ['dva', 'dva/router', 'dva/saga', 'dva/fetch'], include: ['dva', 'dva/router', 'dva/saga', 'dva/fetch'],
exclude: ['@babel/runtime'], exclude: ['@babel/runtime', 'netlify-lambda'],
}, },
hardSource: false, hardSource: false,
} }
...@@ -91,10 +91,6 @@ export default { ...@@ -91,10 +91,6 @@ export default {
theme: { theme: {
'primary-color': primaryColor, 'primary-color': primaryColor,
}, },
externals: {
'@antv/data-set': 'DataSet',
bizcharts: 'BizCharts',
},
// proxy: { // proxy: {
// '/server/api/': { // '/server/api/': {
// target: 'https://preview.pro.ant.design/', // target: 'https://preview.pro.ant.design/',
......
...@@ -4,6 +4,25 @@ import MergeLessPlugin from 'antd-pro-merge-less'; ...@@ -4,6 +4,25 @@ import MergeLessPlugin from 'antd-pro-merge-less';
import AntDesignThemePlugin from 'antd-theme-webpack-plugin'; import AntDesignThemePlugin from 'antd-theme-webpack-plugin';
import path from 'path'; import path from 'path';
function getModulePackageName(module) {
if (!module.context) return null;
const nodeModulesPath = path.join(__dirname, '../node_modules/');
if (module.context.substring(0, nodeModulesPath.length) !== nodeModulesPath) {
return null;
}
const moduleRelativePath = module.context.substring(nodeModulesPath.length);
const [moduleDirName] = moduleRelativePath.split(path.sep);
let packageName = moduleDirName;
// handle tree shaking
if (packageName.match('^_')) {
// eslint-disable-next-line prefer-destructuring
packageName = packageName.match(/^_(@?[^@]+)/)[1];
}
return packageName;
}
export default config => { export default config => {
// pro 和 开发环境再添加这个插件 // pro 和 开发环境再添加这个插件
if (process.env.APP_TYPE === 'site' || process.env.NODE_ENV !== 'production') { if (process.env.APP_TYPE === 'site' || process.env.NODE_ENV !== 'production') {
...@@ -30,4 +49,32 @@ export default config => { ...@@ -30,4 +49,32 @@ export default config => {
}, },
]); ]);
} }
// optimize chunks
config.optimization
.runtimeChunk(false) // share the same chunks across different modules
.splitChunks({
chunks: 'async',
name: 'vendors',
maxInitialRequests: Infinity,
minSize: 0,
cacheGroups: {
vendors: {
test: module => {
const packageName = getModulePackageName(module);
if (packageName) {
return ['bizcharts', '@antv_data-set'].indexOf(packageName) >= 0;
}
return false;
},
name(module) {
const packageName = getModulePackageName(module);
if (['bizcharts', '@antv_data-set'].indexOf(packageName) >= 0) {
return 'viz'; // visualization package
}
return 'misc';
},
},
},
});
}; };
...@@ -12,6 +12,9 @@ export default [ ...@@ -12,6 +12,9 @@ export default [
name: 'register.result', name: 'register.result',
component: './User/RegisterResult', component: './User/RegisterResult',
}, },
{
component: '404',
},
], ],
}, },
// app // app
...@@ -19,10 +22,9 @@ export default [ ...@@ -19,10 +22,9 @@ export default [
path: '/', path: '/',
component: '../layouts/BasicLayout', component: '../layouts/BasicLayout',
Routes: ['src/pages/Authorized'], Routes: ['src/pages/Authorized'],
authority: ['admin', 'user'],
routes: [ routes: [
// dashboard // dashboard
{ path: '/', redirect: '/dashboard/analysis' }, { path: '/', redirect: '/dashboard/analysis', authority: ['admin', 'user'] },
{ {
path: '/dashboard', path: '/dashboard',
name: 'dashboard', name: 'dashboard',
...@@ -265,6 +267,29 @@ export default [ ...@@ -265,6 +267,29 @@ export default [
}, },
], ],
}, },
// editor
{
name: 'editor',
icon: 'highlight',
path: '/editor',
routes: [
{
path: '/editor/flow',
name: 'flow',
component: './Editor/GGEditor/Flow',
},
{
path: '/editor/mind',
name: 'mind',
component: './Editor/GGEditor/Mind',
},
{
path: '/editor/koni',
name: 'koni',
component: './Editor/GGEditor/Koni',
},
],
},
{ {
component: '404', component: '404',
}, },
......
{
"hosting": {
"public": "dist",
"rewrites": [
{ "source": "/api/**", "function": "api" },
{
"source": "**",
"destination": "/index.html"
}
],
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"]
}
}
{
"name": "functions",
"description": "Cloud Functions for Firebase",
"scripts": {
"serve": "firebase serve --only functions",
"shell": "firebase functions:shell",
"start": "npm run shell",
"deploy": "npm run mock && firebase deploy --only functions",
"logs": "firebase functions:log",
"mock": "node ../scripts/generateMock.js"
},
"dependencies": {
"@babel/runtime": "^7.0.0",
"body-parser": "^1.18.3",
"express": "^4.16.4",
"firebase-admin": "^6.4.0",
"firebase-functions": "^2.1.0",
"mockjs": "^1.0.1-beta3",
"moment": "^2.22.2",
"path-to-regexp": "^3.0.0"
},
"private": true
}
...@@ -6,6 +6,7 @@ module.exports = { ...@@ -6,6 +6,7 @@ module.exports = {
'--disable-dev-shm-usage', '--disable-dev-shm-usage',
'--no-first-run', '--no-first-run',
'--no-zygote', '--no-zygote',
'--no-sandbox',
], ],
}, },
}; };
// [START functionsimport] // [START functions import]
const functions = require('firebase-functions');
const express = require('express'); const express = require('express');
const serverLess = require('serverless-http');
const matchMock = require('./matchMock'); const matchMock = require('./mock/matchMock');
const app = express(); const app = express();
app.use(matchMock); app.use(matchMock);
exports.api = functions.https.onRequest(app);
exports.handler = serverLess(app);
const pathToRegexp = require('path-to-regexp'); const pathToRegexp = require('path-to-regexp');
const bodyParser = require('body-parser'); const bodyParser = require('body-parser');
const mockFile = require('./mock/index'); const mockFile = require('./index');
const BODY_PARSED_METHODS = ['post', 'put', 'patch']; const BODY_PARSED_METHODS = ['post', 'put', 'patch'];
...@@ -10,13 +10,14 @@ function parseKey(key) { ...@@ -10,13 +10,14 @@ function parseKey(key) {
let method = 'get'; let method = 'get';
let path = key; let path = key;
if (key.indexOf(' ') > -1) { if (key.indexOf(' ') > -1) {
const splited = key.split(' '); const spliced = key.split(' ');
method = splited[0].toLowerCase(); method = spliced[0].toLowerCase();
path = splited[1]; // eslint-disable-line path = spliced[1]; // eslint-disable-line
} }
const routerBasePath = process.env.NODE_ENV === 'dev' ? `${path}` : `/.netlify/functions${path}`;
return { return {
method, method,
path, path: routerBasePath,
}; };
} }
......
const fakeNotices = [ const getNotices = (req, res) =>
res.json([
{ {
id: '000000001', id: '000000001',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png', avatar: 'https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png',
...@@ -94,21 +95,7 @@ const fakeNotices = [ ...@@ -94,21 +95,7 @@ const fakeNotices = [
status: 'processing', status: 'processing',
type: 'event', type: 'event',
}, },
]; ]);
const getNotices = (req, res) => {
if (req.query && req.query.type) {
const startFrom = parseInt(req.query.lastItemId, 10) + 1;
const result = fakeNotices
.filter(({ type }) => type === req.query.type)
.map((notice, index) => ({
...notice,
id: `0000000${startFrom + index}`,
}));
return res.json(startFrom > 24 ? result.concat(null) : result);
}
return res.json(fakeNotices);
};
export default { export default {
'GET /api/notices': getNotices, 'GET /api/notices': getNotices,
......
...@@ -192,6 +192,25 @@ export default { ...@@ -192,6 +192,25 @@ export default {
}, },
], ],
}, },
{
name: 'editor',
icon: 'highlight',
path: '/editor',
routes: [
{
path: '/editor/flow',
name: 'flow',
},
{
path: '/editor/mind',
name: 'mind',
},
{
path: '/editor/koni',
name: 'koni',
},
],
},
], ],
}, },
}; };
[build]
functions = "./functions"
[[redirects]] [[redirects]]
from = "/api/*" from = "/api/*"
to = "https://us-central1-antd-pro.cloudfunctions.net/api/api/:splat" to = "/.netlify/functions/api/:splat"
status = 200 status = 200
force = true force = true
[redirects.headers] [redirects.headers]
......
{ {
"name": "ant-design-pro", "name": "ant-design-pro",
"version": "2.2.1", "version": "2.3.1",
"description": "An out-of-box UI solution for enterprise applications",
"private": true, "private": true,
"description": "An out-of-box UI solution for enterprise applications",
"scripts": { "scripts": {
"presite": "cd functions && npm install",
"start": "cross-env APP_TYPE=site umi dev",
"start:no-mock": "cross-env MOCK=none umi dev",
"build": "umi build",
"site": "npm run presite && cross-env APP_TYPE=site npm run build && firebase deploy && npm run docker:push",
"analyze": "cross-env ANALYZE=1 umi build", "analyze": "cross-env ANALYZE=1 umi build",
"lint:style": "stylelint 'src/**/*.less' --syntax less", "build": "umi build && npm run functions:build",
"lint:prettier": "check-prettier lint", "docker-hub:build": "docker build -f Dockerfile.hub -t ant-design-pro ./",
"docker-prod:build": "docker-compose -f ./docker/docker-compose.yml build",
"docker-prod:dev": "docker-compose -f ./docker/docker-compose.yml up",
"docker:build": "docker-compose -f ./docker/docker-compose.dev.yml build",
"docker:dev": "docker-compose -f ./docker/docker-compose.dev.yml up",
"docker:push": "npm run docker-hub:build && npm run docker:tag && docker push antdesign/ant-design-pro",
"docker:tag": "docker tag ant-design-pro antdesign/ant-design-pro",
"functions:build": "npm run generateMock && netlify-lambda build ./lambda",
"functions:run": "npm run generateMock && cross-env NODE_ENV=dev netlify-lambda serve ./lambda",
"generateMock": "node ./scripts/generateMock",
"lint": "eslint --ext .js src mock tests && npm run lint:style && npm run lint:prettier", "lint": "eslint --ext .js src mock tests && npm run lint:style && npm run lint:prettier",
"lint:fix": "eslint --fix --ext .js src mock tests && stylelint --fix 'src/**/*.less' --syntax less",
"lint-staged": "lint-staged", "lint-staged": "lint-staged",
"lint-staged:js": "eslint --ext .js", "lint-staged:js": "eslint --ext .js",
"tslint": "npm run tslint:fix", "lint:fix": "eslint --fix --ext .js src mock tests && stylelint --fix 'src/**/*.less' --syntax less",
"tslint:fix": "tslint --fix 'src/**/*.ts*'", "lint:prettier": "check-prettier lint",
"lint:style": "stylelint 'src/**/*.less' --syntax less",
"prettier": "node ./scripts/prettier.js",
"start": "cross-env APP_TYPE=site umi dev",
"start:no-mock": "cross-env MOCK=none umi dev",
"test": "umi test", "test": "umi test",
"test:component": "umi test ./src/components",
"test:all": "node ./tests/run-tests.js", "test:all": "node ./tests/run-tests.js",
"prettier": "node ./scripts/prettier.js", "test:component": "umi test ./src/components",
"docker:dev": "docker-compose -f ./docker/docker-compose.dev.yml up", "tslint": "npm run tslint:fix",
"docker:build": "docker-compose -f ./docker/docker-compose.dev.yml build", "tslint:fix": "tslint --fix 'src/**/*.ts*'"
"docker-prod:dev": "docker-compose -f ./docker/docker-compose.yml up", },
"docker-prod:build": "docker-compose -f ./docker/docker-compose.yml build", "husky": {
"docker-hub:build": "docker build -f Dockerfile.hub -t ant-design-pro ./", "hooks": {
"docker:tag": "docker tag ant-design-pro antdesign/ant-design-pro", "pre-commit": "npm run lint-staged"
"docker:push": "npm run docker-hub:build && npm run docker:tag && docker push antdesign/ant-design-pro" }
}, },
"lint-staged": {
"**/*.less": "stylelint --syntax less",
"**/*.{js,jsx}": "npm run lint-staged:js",
"**/*.{js,ts,tsx,json,jsx,less}": [
"node ./scripts/lint-prettier.js",
"git add"
]
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 10"
],
"dependencies": { "dependencies": {
"@antv/data-set": "^0.10.1", "@antv/data-set": "^0.10.1",
"@babel/runtime": "^7.3.1",
"antd": "^3.13.0", "antd": "^3.13.0",
"bizcharts": "^3.4.3", "bizcharts": "^3.4.3",
"bizcharts-plugin-slider": "^2.1.1-beta.1", "bizcharts-plugin-slider": "^2.1.1-beta.1",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"dva": "^2.4.1", "dva": "^2.4.1",
"enquire-js": "^0.2.1", "enquire-js": "^0.2.1",
"hash.js": "^1.1.7", "express": "^4.16.4",
"gg-editor": "^2.0.2",
"lodash": "^4.17.11", "lodash": "^4.17.11",
"lodash-decorators": "^6.0.1", "lodash-decorators": "^6.0.1",
"memoize-one": "^5.0.0", "memoize-one": "^5.0.0",
"moment": "^2.24.0", "moment": "^2.24.0",
"netlify-lambda": "^1.4.3",
"numeral": "^2.0.6", "numeral": "^2.0.6",
"nzh": "^1.0.4", "nzh": "^1.0.4",
"omit.js": "^1.0.0", "omit.js": "^1.0.0",
...@@ -58,10 +78,13 @@ ...@@ -58,10 +78,13 @@
"react-dom": "^16.7.0", "react-dom": "^16.7.0",
"react-fittext": "^1.0.0", "react-fittext": "^1.0.0",
"react-media": "^1.9.2", "react-media": "^1.9.2",
"react-router-dom": "^4.3.1", "umi": "^2.4.4",
"umi-plugin-react": "^1.7.2",
"umi-request": "^1.0.5",
"umi-plugin-authorize": "^1.0.0" "umi-plugin-authorize": "^1.0.0"
}, },
"devDependencies": { "devDependencies": {
"@types/history": "^4.7.2",
"@types/react": "^16.8.1", "@types/react": "^16.8.1",
"@types/react-dom": "^16.0.11", "@types/react-dom": "^16.0.11",
"antd-pro-merge-less": "^1.0.0", "antd-pro-merge-less": "^1.0.0",
...@@ -71,28 +94,28 @@ ...@@ -71,28 +94,28 @@
"check-prettier": "^1.0.1", "check-prettier": "^1.0.1",
"cross-env": "^5.2.0", "cross-env": "^5.2.0",
"cross-port-killer": "^1.0.1", "cross-port-killer": "^1.0.1",
"enzyme": "3.8.0", "enzyme": "^3.9.0",
"eslint": "^5.13.0", "eslint": "^5.13.0",
"eslint-config-airbnb": "^17.1.0", "eslint-config-airbnb": "^17.1.0",
"eslint-config-prettier": "^4.0.0", "eslint-config-prettier": "^4.1.0",
"eslint-plugin-babel": "^5.3.0", "eslint-plugin-babel": "^5.3.0",
"eslint-plugin-compat": "^2.6.3", "eslint-plugin-compat": "^2.6.3",
"eslint-plugin-import": "^2.16.0", "eslint-plugin-import": "^2.16.0",
"eslint-plugin-jsx-a11y": "^6.2.0", "eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-markdown": "^1.0.0", "eslint-plugin-markdown": "^1.0.0",
"eslint-plugin-react": "^7.12.4", "eslint-plugin-react": "^7.12.4",
"gh-pages": "^2.0.1", "gh-pages": "^2.0.1",
"husky": "^1.3.1", "husky": "^1.3.1",
"jest-puppeteer": "^3.9.0", "jest-puppeteer": "^4.1.0",
"less": "^3.9.0", "less": "^3.9.0",
"lint-staged": "^8.1.1", "lint-staged": "^8.1.1",
"merge-umi-mock-data": "^1.0.4", "merge-umi-mock-data": "^1.0.4",
"mockjs": "^1.0.1-beta3", "mockjs": "^1.0.1-beta3",
"prettier": "1.16.3", "prettier": "^1.16.4",
"slash2": "^2.0.0", "slash2": "^2.0.0",
"stylelint": "^9.10.1", "stylelint": "^9.10.1",
"stylelint-config-css-modules": "^1.3.0", "stylelint-config-css-modules": "^1.3.0",
"stylelint-config-prettier": "^4.0.0", "stylelint-config-prettier": "^5.0.0",
"stylelint-config-rational-order": "^0.0.4", "stylelint-config-rational-order": "^0.0.4",
"stylelint-config-standard": "^18.2.0", "stylelint-config-standard": "^18.2.0",
"stylelint-declaration-block-no-ignored-properties": "^1.1.0", "stylelint-declaration-block-no-ignored-properties": "^1.1.0",
...@@ -100,39 +123,20 @@ ...@@ -100,39 +123,20 @@
"tslint": "^5.12.1", "tslint": "^5.12.1",
"tslint-config-prettier": "^1.17.0", "tslint-config-prettier": "^1.17.0",
"tslint-react": "^3.6.0", "tslint-react": "^3.6.0",
"umi": "^2.4.4",
"umi-plugin-ga": "^1.1.3", "umi-plugin-ga": "^1.1.3",
"umi-plugin-react": "^1.4.2" "serverless-http": "^1.9.1"
}, },
"optionalDependencies": { "optionalDependencies": {
"puppeteer": "^1.12.1" "puppeteer": "^1.12.1"
}, },
"lint-staged": {
"**/*.{js,ts,tsx,json,jsx,less}": [
"node ./scripts/lint-prettier.js",
"git add"
],
"**/*.{js,jsx}": "npm run lint-staged:js",
"**/*.less": "stylelint --syntax less"
},
"engines": { "engines": {
"node": ">=8.0.0" "node": ">=8.0.0"
}, },
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 10"
],
"checkFiles": [ "checkFiles": [
"src/**/*.js*", "src/**/*.js*",
"src/**/*.ts*", "src/**/*.ts*",
"src/**/*.less", "src/**/*.less",
"config/**/*.js*", "config/**/*.js*",
"scripts/**/*.js" "scripts/**/*.js"
], ]
"husky": {
"hooks": {
"pre-commit": "npm run lint-staged"
}
}
} }
<?xml version="1.0" encoding="UTF-8"?>
<svg width="86px" height="78px" viewBox="0 0 86 78" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 49.1 (51147) - http://www.bohemiancoding.com/sketch -->
<title>Group 3</title>
<desc>Created with Sketch.</desc>
<defs>
<path d="M42.6703722,1.66995728 L77.6353026,33.0218945 C79.2800648,34.4967003 79.4178417,37.0256099 77.9430359,38.6703722 C77.8461185,38.7784583 77.7433887,38.8811881 77.6353026,38.9781055 L42.6703722,70.3300427 C41.1508289,71.6925687 38.8491711,71.6925687 37.3296278,70.3300427 L2.36469744,38.9781055 C0.719935183,37.5032997 0.582158272,34.9743901 2.0569641,33.3296278 C2.1538815,33.2215417 2.25661129,33.1188119 2.36469744,33.0218945 L37.3296278,1.66995728 C38.8491711,0.307431303 41.1508289,0.307431303 42.6703722,1.66995728 Z" id="path-1"></path>
<filter x="-8.8%" y="-6.9%" width="117.5%" height="119.4%" filterUnits="objectBoundingBox" id="filter-2">
<feOffset dx="0" dy="2" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feComposite in="shadowBlurOuter1" in2="SourceAlpha" operator="out" result="shadowBlurOuter1"></feComposite>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
</filter>
</defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Flow-01" transform="translate(-7.000000, -184.000000)">
<g id="Group-3" transform="translate(10.000000, 185.000000)">
<g id="Polygon">
<use fill="black" fill-opacity="1" filter="url(#filter-2)" xlink:href="#path-1"></use>
<use fill-opacity="0.92" fill="#E6FFFB" fill-rule="evenodd" xlink:href="#path-1"></use>
<path stroke="#5CDBD3" stroke-width="1" d="M42.3365757,2.04222047 C41.0069753,0.850010239 38.9930247,0.850010239 37.6634243,2.04222047 L2.69849396,33.3941577 C2.60391858,33.4789604 2.51403002,33.568849 2.42922729,33.6634243 C1.13877219,35.1025913 1.25932699,37.3153872 2.69849396,38.6058423 L37.6634243,69.9577795 C38.9930247,71.1499898 41.0069753,71.1499898 42.3365757,69.9577795 L77.301506,38.6058423 C77.3960814,38.5210396 77.48597,38.431151 77.5707727,38.3365757 C78.8612278,36.8974087 78.740673,34.6846128 77.301506,33.3941577 L42.3365757,2.04222047 Z"></path>
</g>
<text id="decision" font-family="PingFangSC-Regular, PingFang SC" font-size="12" font-weight="normal" line-spacing="12" fill="#000000" fill-opacity="0.65">
<tspan x="18" y="42">Decision</tspan>
</text>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="88px" height="56px" viewBox="0 0 88 56" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 49.1 (51147) - http://www.bohemiancoding.com/sketch -->
<title>Group 4</title>
<desc>Created with Sketch.</desc>
<defs>
<rect id="path-1" x="0" y="0" width="80" height="48" rx="24"></rect>
<filter x="-8.8%" y="-10.4%" width="117.5%" height="129.2%" filterUnits="objectBoundingBox" id="filter-2">
<feOffset dx="0" dy="2" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feComposite in="shadowBlurOuter1" in2="SourceAlpha" operator="out" result="shadowBlurOuter1"></feComposite>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
</filter>
</defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Flow-01" transform="translate(-102.000000, -195.000000)">
<g id="Group-4" transform="translate(106.000000, 197.000000)">
<g id="Rectangle-15-Copy-35">
<use fill="black" fill-opacity="1" filter="url(#filter-2)" xlink:href="#path-1"></use>
<use fill-opacity="0.92" fill="#F9F0FF" fill-rule="evenodd" xlink:href="#path-1"></use>
<rect stroke="#B37FEB" stroke-width="1" x="0.5" y="0.5" width="79" height="47" rx="23.5"></rect>
</g>
<text id="model" font-family="PingFangSC-Regular, PingFang SC" font-size="12" font-weight="normal" line-spacing="12" fill="#000000" fill-opacity="0.65">
<tspan x="24" y="29">Model</tspan>
</text>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="88px" height="56px" viewBox="0 0 88 56" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 49.1 (51147) - http://www.bohemiancoding.com/sketch -->
<title>Group</title>
<desc>Created with Sketch.</desc>
<defs>
<rect id="path-1" x="0" y="0" width="80" height="48" rx="4"></rect>
<filter x="-8.8%" y="-10.4%" width="117.5%" height="129.2%" filterUnits="objectBoundingBox" id="filter-2">
<feOffset dx="0" dy="2" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feComposite in="shadowBlurOuter1" in2="SourceAlpha" operator="out" result="shadowBlurOuter1"></feComposite>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
</filter>
</defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Flow-01" transform="translate(-6.000000, -105.000000)">
<g id="Group" transform="translate(10.000000, 107.000000)">
<g id="Rectangle-15-Copy">
<use fill="black" fill-opacity="1" filter="url(#filter-2)" xlink:href="#path-1"></use>
<use fill-opacity="0.92" fill="#E6F7FF" fill-rule="evenodd" xlink:href="#path-1"></use>
<rect stroke="#1890FF" stroke-width="1" x="0.5" y="0.5" width="79" height="47" rx="4"></rect>
</g>
<text id="normal" font-family="PingFangSC-Regular, PingFang SC" font-size="12" font-weight="normal" line-spacing="12" fill="#000000" fill-opacity="0.65">
<tspan x="21" y="29">Normal</tspan>
</text>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="80px" height="80px" viewBox="0 0 80 80" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 49.1 (51147) - http://www.bohemiancoding.com/sketch -->
<title>Group 2</title>
<desc>Created with Sketch.</desc>
<defs>
<circle id="path-1" cx="36" cy="36" r="36"></circle>
<filter x="-9.7%" y="-6.9%" width="119.4%" height="119.4%" filterUnits="objectBoundingBox" id="filter-2">
<feOffset dx="0" dy="2" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feComposite in="shadowBlurOuter1" in2="SourceAlpha" operator="out" result="shadowBlurOuter1"></feComposite>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
</filter>
</defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Flow-01" transform="translate(-106.000000, -93.000000)">
<g id="Group-2" transform="translate(110.000000, 95.000000)">
<g id="Oval">
<use fill="black" fill-opacity="1" filter="url(#filter-2)" xlink:href="#path-1"></use>
<use fill-opacity="0.92" fill="#FFF2E8" fill-rule="evenodd" xlink:href="#path-1"></use>
<circle stroke="#FFC069" stroke-width="1" cx="36" cy="36" r="35.5"></circle>
</g>
<text id="start" font-family="PingFangSC-Regular, PingFang SC" font-size="12" font-weight="normal" line-spacing="12" fill="#000000" fill-opacity="0.65">
<tspan x="23" y="41">Start</tspan>
</text>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="48px" height="48px" viewBox="0 0 48 48" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 52.2 (67145) - http://www.bohemiancoding.com/sketch -->
<title>Group 16</title>
<desc>Created with Sketch.</desc>
<defs>
<circle id="path-1" cx="20" cy="20" r="20"></circle>
<filter x="-17.5%" y="-12.5%" width="135.0%" height="135.0%" filterUnits="objectBoundingBox" id="filter-2">
<feOffset dx="0" dy="2" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feComposite in="shadowBlurOuter1" in2="SourceAlpha" operator="out" result="shadowBlurOuter1"></feComposite>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
</filter>
</defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="拓扑图编译器" transform="translate(-30.000000, -139.000000)">
<g id="Group-16" transform="translate(34.000000, 141.000000)">
<g id="Oval-Copy-8">
<use fill="black" fill-opacity="1" filter="url(#filter-2)" xlink:href="#path-1"></use>
<circle stroke="#69C0FF" stroke-width="1" stroke-linejoin="square" fill-opacity="0.92" fill="#69C0FF" fill-rule="evenodd" cx="20" cy="20" r="19.5"></circle>
</g>
<g id="earth-copy-6" transform="translate(12.000000, 12.000000)" fill="#FFFFFF" fill-rule="nonzero">
<rect id="Rectangle-path" opacity="0" x="0" y="0" width="16" height="16"></rect>
<path d="M13.35,12.5140625 C13.353125,12.509375 13.3578125,12.5046875 13.3609375,12.5 C14.384375,11.2828125 15,9.7140625 15,8 C15,6.2859375 14.384375,4.7171875 13.3625,3.5 C13.359375,3.4953125 13.3546875,3.4921875 13.3515625,3.4875 C13.334375,3.4671875 13.31875,3.4484375 13.3015625,3.4296875 C13.2953125,3.421875 13.2890625,3.415625 13.2828125,3.4078125 C13.2609375,3.3828125 13.240625,3.359375 13.21875,3.334375 L13.2171875,3.3328125 C13.19375,3.30625 13.16875,3.2796875 13.1453125,3.253125 L13.14375,3.2515625 C13.09375,3.1984375 13.04375,3.1453125 12.9921875,3.09375 L12.990625,3.0921875 L12.915625,3.0171875 L12.9109375,3.0125 C12.8875,2.9890625 12.8640625,2.9671875 12.840625,2.9453125 C12.8328125,2.9375 12.825,2.9296875 12.815625,2.921875 C12.8,2.90625 12.784375,2.8921875 12.76875,2.878125 C12.7640625,2.8734375 12.7578125,2.86875 12.753125,2.8625 C11.50625,1.70625 9.8359375,1 8,1 C6.1640625,1 4.49375,1.70625 3.2453125,2.8625 C3.240625,2.8671875 3.234375,2.871875 3.2296875,2.878125 C3.2140625,2.8921875 3.1984375,2.9078125 3.1828125,2.9234375 C3.175,2.93125 3.1671875,2.9390625 3.1578125,2.946875 C3.134375,2.96875 3.1109375,2.9921875 3.0875,3.0140625 L3.0828125,3.01875 L3.0078125,3.09375 L3.00625,3.0953125 C2.9546875,3.146875 2.9046875,3.2 2.8546875,3.253125 L2.853125,3.2546875 C2.828125,3.28125 2.8046875,3.3078125 2.78125,3.334375 L2.7796875,3.3359375 C2.7578125,3.359375 2.7359375,3.384375 2.715625,3.409375 C2.709375,3.4171875 2.703125,3.4234375 2.696875,3.43125 C2.6796875,3.45 2.6640625,3.4703125 2.646875,3.4890625 C2.64375,3.49375 2.6390625,3.496875 2.6359375,3.5015625 C1.615625,4.7171875 1,6.2859375 1,8 C1,9.7140625 1.615625,11.2828125 2.6375,12.5 C2.640625,12.5046875 2.6453125,12.509375 2.6484375,12.5140625 C2.6640625,12.5328125 2.68125,12.553125 2.696875,12.571875 C2.703125,12.5796875 2.709375,12.5859375 2.715625,12.59375 C2.7375,12.61875 2.7578125,12.6421875 2.7796875,12.6671875 C2.7796875,12.66875 2.78125,12.66875 2.78125,12.6703125 C2.8046875,12.696875 2.828125,12.7234375 2.853125,12.7484375 L2.8546875,12.75 C2.9046875,12.803125 2.9546875,12.85625 3.0046875,12.9078125 L3.00625,12.909375 C3.03125,12.934375 3.0546875,12.959375 3.0796875,12.9828125 L3.084375,12.9875 C3.1359375,13.0390625 3.1890625,13.0890625 3.2421875,13.1375 C4.49375,14.29375 6.1640625,15 8,15 C9.8359375,15 11.50625,14.29375 12.7546875,13.1375 C12.8078125,13.0890625 12.859375,13.0390625 12.9109375,12.9875 L12.915625,12.9828125 C12.940625,12.9578125 12.965625,12.934375 12.9890625,12.909375 L12.990625,12.9078125 C13.0421875,12.85625 13.0921875,12.803125 13.140625,12.75 L13.1421875,12.7484375 C13.165625,12.721875 13.190625,12.696875 13.2140625,12.6703125 C13.2140625,12.66875 13.215625,12.66875 13.215625,12.6671875 C13.2375,12.64375 13.259375,12.61875 13.2796875,12.59375 C13.2859375,12.5859375 13.2921875,12.5796875 13.2984375,12.571875 C13.3171875,12.5515625 13.334375,12.5328125 13.35,12.5140625 Z M13.4140625,10.2859375 C13.1984375,10.7953125 12.9140625,11.2671875 12.5671875,11.6953125 C12.178125,11.359375 11.7515625,11.065625 11.29375,10.821875 C11.475,10.0890625 11.5875,9.284375 11.6171875,8.4375 L13.859375,8.4375 C13.8125,9.0765625 13.6625,9.696875 13.4140625,10.2859375 Z M13.859375,7.5625 L11.6171875,7.5625 C11.5875,6.715625 11.475,5.9109375 11.29375,5.178125 C11.7515625,4.934375 12.178125,4.640625 12.5671875,4.3046875 C12.9140625,4.7328125 13.1984375,5.2046875 13.4140625,5.7140625 C13.6625,6.303125 13.8125,6.9234375 13.859375,7.5625 Z M10.2859375,2.5859375 C10.90625,2.8484375 11.4703125,3.2109375 11.9671875,3.6671875 C11.678125,3.9140625 11.3671875,4.13125 11.0390625,4.3203125 C10.79375,3.6171875 10.4796875,3.00625 10.1140625,2.5171875 C10.171875,2.5390625 10.2296875,2.5625 10.2859375,2.5859375 Z M8.8703125,13.5328125 C8.7265625,13.6453125 8.5828125,13.73125 8.4375,13.7890625 L8.4375,10.890625 C9.0609375,10.934375 9.665625,11.071875 10.2453125,11.3 C10.115625,11.684375 9.965625,12.0390625 9.7921875,12.359375 C9.5203125,12.865625 9.2015625,13.2703125 8.8703125,13.5328125 Z M9.7921875,3.640625 C9.9640625,3.9625 10.115625,4.3171875 10.2453125,4.7 C9.665625,4.928125 9.0609375,5.065625 8.4375,5.109375 L8.4375,2.2125 C8.58125,2.2703125 8.7265625,2.3546875 8.8703125,2.46875 C9.2015625,2.7296875 9.5203125,3.134375 9.7921875,3.640625 Z M8.4375,10.0140625 L8.4375,8.4375 L10.7421875,8.4375 C10.7171875,9.128125 10.63125,9.7984375 10.4875,10.434375 L10.4828125,10.453125 C9.840625,10.209375 9.153125,10.0578125 8.4375,10.0140625 Z M8.4375,7.5625 L8.4375,5.9859375 C9.153125,5.9421875 9.840625,5.790625 10.4828125,5.546875 L10.4875,5.565625 C10.63125,6.2015625 10.7171875,6.8703125 10.7421875,7.5625 L8.4375,7.5625 Z M7.5625,8.4375 L7.5625,10.0140625 C6.846875,10.0578125 6.159375,10.209375 5.5171875,10.453125 L5.5125,10.434375 C5.36875,9.7984375 5.2828125,9.1296875 5.2578125,8.4375 L7.5625,8.4375 Z M5.2578125,7.5625 C5.2828125,6.871875 5.36875,6.2015625 5.5125,5.565625 L5.5171875,5.546875 C6.159375,5.790625 6.8453125,5.9421875 7.5625,5.9859375 L7.5625,7.5625 L5.2578125,7.5625 Z M7.5625,10.890625 L7.5625,13.7875 C7.41875,13.7296875 7.2734375,13.6453125 7.1296875,13.53125 C6.7984375,13.2703125 6.478125,12.8640625 6.20625,12.3578125 C6.034375,12.0359375 5.8828125,11.68125 5.753125,11.2984375 C6.334375,11.0703125 6.9390625,10.934375 7.5625,10.890625 Z M7.5625,5.109375 C6.9390625,5.065625 6.334375,4.928125 5.7546875,4.7 C5.884375,4.315625 6.034375,3.9609375 6.2078125,3.640625 C6.4796875,3.134375 6.7984375,2.728125 7.13125,2.4671875 C7.275,2.3546875 7.41875,2.26875 7.5640625,2.2109375 L7.5640625,5.109375 L7.5625,5.109375 Z M5.7140625,2.5859375 C5.771875,2.5625 5.828125,2.5390625 5.8859375,2.5171875 C5.5203125,3.00625 5.20625,3.6171875 4.9609375,4.3203125 C4.6328125,4.1328125 4.321875,3.9140625 4.0328125,3.6671875 C4.5296875,3.2109375 5.09375,2.8484375 5.7140625,2.5859375 Z M2.5859375,5.7140625 C2.8015625,5.2046875 3.0859375,4.7328125 3.4328125,4.3046875 C3.821875,4.640625 4.2484375,4.934375 4.70625,5.178125 C4.525,5.9109375 4.4125,6.715625 4.3828125,7.5625 L2.140625,7.5625 C2.1875,6.9234375 2.3375,6.303125 2.5859375,5.7140625 Z M2.140625,8.4375 L4.3828125,8.4375 C4.4125,9.284375 4.525,10.0890625 4.70625,10.821875 C4.2484375,11.065625 3.821875,11.359375 3.4328125,11.6953125 C3.0859375,11.2671875 2.8015625,10.7953125 2.5859375,10.2859375 C2.3375,9.696875 2.1875,9.0765625 2.140625,8.4375 Z M5.7140625,13.4140625 C5.09375,13.1515625 4.5296875,12.7890625 4.0328125,12.3328125 C4.321875,12.0859375 4.6328125,11.86875 4.9609375,11.6796875 C5.20625,12.3828125 5.5203125,12.99375 5.8859375,13.4828125 C5.828125,13.4609375 5.7703125,13.4375 5.7140625,13.4140625 Z M10.2859375,13.4140625 C10.228125,13.4375 10.171875,13.4609375 10.1140625,13.4828125 C10.4796875,12.99375 10.79375,12.3828125 11.0390625,11.6796875 C11.3671875,11.8671875 11.678125,12.0859375 11.9671875,12.3328125 C11.4703125,12.7890625 10.90625,13.1515625 10.2859375,13.4140625 Z" id="Shape"></path>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="48px" height="48px" viewBox="0 0 48 48" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 52.2 (67145) - http://www.bohemiancoding.com/sketch -->
<title>Group 18</title>
<desc>Created with Sketch.</desc>
<defs>
<circle id="path-1" cx="20" cy="20" r="20"></circle>
<filter x="-17.5%" y="-12.5%" width="135.0%" height="135.0%" filterUnits="objectBoundingBox" id="filter-2">
<feOffset dx="0" dy="2" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feComposite in="shadowBlurOuter1" in2="SourceAlpha" operator="out" result="shadowBlurOuter1"></feComposite>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
</filter>
</defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="拓扑图编译器" transform="translate(-218.000000, -139.000000)">
<g id="Group-18" transform="translate(222.000000, 141.000000)">
<g id="Oval-Copy-10">
<use fill="black" fill-opacity="1" filter="url(#filter-2)" xlink:href="#path-1"></use>
<circle stroke="#B37FEB" stroke-width="1" stroke-linejoin="square" fill-opacity="0.92" fill="#B37FEB" fill-rule="evenodd" cx="20" cy="20" r="19.5"></circle>
</g>
<g id="earth-copy-8" transform="translate(12.000000, 12.000000)" fill="#FFFFFF" fill-rule="nonzero">
<rect id="Rectangle-path" opacity="0" x="0" y="0" width="16" height="16"></rect>
<path d="M13.35,12.5140625 C13.353125,12.509375 13.3578125,12.5046875 13.3609375,12.5 C14.384375,11.2828125 15,9.7140625 15,8 C15,6.2859375 14.384375,4.7171875 13.3625,3.5 C13.359375,3.4953125 13.3546875,3.4921875 13.3515625,3.4875 C13.334375,3.4671875 13.31875,3.4484375 13.3015625,3.4296875 C13.2953125,3.421875 13.2890625,3.415625 13.2828125,3.4078125 C13.2609375,3.3828125 13.240625,3.359375 13.21875,3.334375 L13.2171875,3.3328125 C13.19375,3.30625 13.16875,3.2796875 13.1453125,3.253125 L13.14375,3.2515625 C13.09375,3.1984375 13.04375,3.1453125 12.9921875,3.09375 L12.990625,3.0921875 L12.915625,3.0171875 L12.9109375,3.0125 C12.8875,2.9890625 12.8640625,2.9671875 12.840625,2.9453125 C12.8328125,2.9375 12.825,2.9296875 12.815625,2.921875 C12.8,2.90625 12.784375,2.8921875 12.76875,2.878125 C12.7640625,2.8734375 12.7578125,2.86875 12.753125,2.8625 C11.50625,1.70625 9.8359375,1 8,1 C6.1640625,1 4.49375,1.70625 3.2453125,2.8625 C3.240625,2.8671875 3.234375,2.871875 3.2296875,2.878125 C3.2140625,2.8921875 3.1984375,2.9078125 3.1828125,2.9234375 C3.175,2.93125 3.1671875,2.9390625 3.1578125,2.946875 C3.134375,2.96875 3.1109375,2.9921875 3.0875,3.0140625 L3.0828125,3.01875 L3.0078125,3.09375 L3.00625,3.0953125 C2.9546875,3.146875 2.9046875,3.2 2.8546875,3.253125 L2.853125,3.2546875 C2.828125,3.28125 2.8046875,3.3078125 2.78125,3.334375 L2.7796875,3.3359375 C2.7578125,3.359375 2.7359375,3.384375 2.715625,3.409375 C2.709375,3.4171875 2.703125,3.4234375 2.696875,3.43125 C2.6796875,3.45 2.6640625,3.4703125 2.646875,3.4890625 C2.64375,3.49375 2.6390625,3.496875 2.6359375,3.5015625 C1.615625,4.7171875 1,6.2859375 1,8 C1,9.7140625 1.615625,11.2828125 2.6375,12.5 C2.640625,12.5046875 2.6453125,12.509375 2.6484375,12.5140625 C2.6640625,12.5328125 2.68125,12.553125 2.696875,12.571875 C2.703125,12.5796875 2.709375,12.5859375 2.715625,12.59375 C2.7375,12.61875 2.7578125,12.6421875 2.7796875,12.6671875 C2.7796875,12.66875 2.78125,12.66875 2.78125,12.6703125 C2.8046875,12.696875 2.828125,12.7234375 2.853125,12.7484375 L2.8546875,12.75 C2.9046875,12.803125 2.9546875,12.85625 3.0046875,12.9078125 L3.00625,12.909375 C3.03125,12.934375 3.0546875,12.959375 3.0796875,12.9828125 L3.084375,12.9875 C3.1359375,13.0390625 3.1890625,13.0890625 3.2421875,13.1375 C4.49375,14.29375 6.1640625,15 8,15 C9.8359375,15 11.50625,14.29375 12.7546875,13.1375 C12.8078125,13.0890625 12.859375,13.0390625 12.9109375,12.9875 L12.915625,12.9828125 C12.940625,12.9578125 12.965625,12.934375 12.9890625,12.909375 L12.990625,12.9078125 C13.0421875,12.85625 13.0921875,12.803125 13.140625,12.75 L13.1421875,12.7484375 C13.165625,12.721875 13.190625,12.696875 13.2140625,12.6703125 C13.2140625,12.66875 13.215625,12.66875 13.215625,12.6671875 C13.2375,12.64375 13.259375,12.61875 13.2796875,12.59375 C13.2859375,12.5859375 13.2921875,12.5796875 13.2984375,12.571875 C13.3171875,12.5515625 13.334375,12.5328125 13.35,12.5140625 Z M13.4140625,10.2859375 C13.1984375,10.7953125 12.9140625,11.2671875 12.5671875,11.6953125 C12.178125,11.359375 11.7515625,11.065625 11.29375,10.821875 C11.475,10.0890625 11.5875,9.284375 11.6171875,8.4375 L13.859375,8.4375 C13.8125,9.0765625 13.6625,9.696875 13.4140625,10.2859375 Z M13.859375,7.5625 L11.6171875,7.5625 C11.5875,6.715625 11.475,5.9109375 11.29375,5.178125 C11.7515625,4.934375 12.178125,4.640625 12.5671875,4.3046875 C12.9140625,4.7328125 13.1984375,5.2046875 13.4140625,5.7140625 C13.6625,6.303125 13.8125,6.9234375 13.859375,7.5625 Z M10.2859375,2.5859375 C10.90625,2.8484375 11.4703125,3.2109375 11.9671875,3.6671875 C11.678125,3.9140625 11.3671875,4.13125 11.0390625,4.3203125 C10.79375,3.6171875 10.4796875,3.00625 10.1140625,2.5171875 C10.171875,2.5390625 10.2296875,2.5625 10.2859375,2.5859375 Z M8.8703125,13.5328125 C8.7265625,13.6453125 8.5828125,13.73125 8.4375,13.7890625 L8.4375,10.890625 C9.0609375,10.934375 9.665625,11.071875 10.2453125,11.3 C10.115625,11.684375 9.965625,12.0390625 9.7921875,12.359375 C9.5203125,12.865625 9.2015625,13.2703125 8.8703125,13.5328125 Z M9.7921875,3.640625 C9.9640625,3.9625 10.115625,4.3171875 10.2453125,4.7 C9.665625,4.928125 9.0609375,5.065625 8.4375,5.109375 L8.4375,2.2125 C8.58125,2.2703125 8.7265625,2.3546875 8.8703125,2.46875 C9.2015625,2.7296875 9.5203125,3.134375 9.7921875,3.640625 Z M8.4375,10.0140625 L8.4375,8.4375 L10.7421875,8.4375 C10.7171875,9.128125 10.63125,9.7984375 10.4875,10.434375 L10.4828125,10.453125 C9.840625,10.209375 9.153125,10.0578125 8.4375,10.0140625 Z M8.4375,7.5625 L8.4375,5.9859375 C9.153125,5.9421875 9.840625,5.790625 10.4828125,5.546875 L10.4875,5.565625 C10.63125,6.2015625 10.7171875,6.8703125 10.7421875,7.5625 L8.4375,7.5625 Z M7.5625,8.4375 L7.5625,10.0140625 C6.846875,10.0578125 6.159375,10.209375 5.5171875,10.453125 L5.5125,10.434375 C5.36875,9.7984375 5.2828125,9.1296875 5.2578125,8.4375 L7.5625,8.4375 Z M5.2578125,7.5625 C5.2828125,6.871875 5.36875,6.2015625 5.5125,5.565625 L5.5171875,5.546875 C6.159375,5.790625 6.8453125,5.9421875 7.5625,5.9859375 L7.5625,7.5625 L5.2578125,7.5625 Z M7.5625,10.890625 L7.5625,13.7875 C7.41875,13.7296875 7.2734375,13.6453125 7.1296875,13.53125 C6.7984375,13.2703125 6.478125,12.8640625 6.20625,12.3578125 C6.034375,12.0359375 5.8828125,11.68125 5.753125,11.2984375 C6.334375,11.0703125 6.9390625,10.934375 7.5625,10.890625 Z M7.5625,5.109375 C6.9390625,5.065625 6.334375,4.928125 5.7546875,4.7 C5.884375,4.315625 6.034375,3.9609375 6.2078125,3.640625 C6.4796875,3.134375 6.7984375,2.728125 7.13125,2.4671875 C7.275,2.3546875 7.41875,2.26875 7.5640625,2.2109375 L7.5640625,5.109375 L7.5625,5.109375 Z M5.7140625,2.5859375 C5.771875,2.5625 5.828125,2.5390625 5.8859375,2.5171875 C5.5203125,3.00625 5.20625,3.6171875 4.9609375,4.3203125 C4.6328125,4.1328125 4.321875,3.9140625 4.0328125,3.6671875 C4.5296875,3.2109375 5.09375,2.8484375 5.7140625,2.5859375 Z M2.5859375,5.7140625 C2.8015625,5.2046875 3.0859375,4.7328125 3.4328125,4.3046875 C3.821875,4.640625 4.2484375,4.934375 4.70625,5.178125 C4.525,5.9109375 4.4125,6.715625 4.3828125,7.5625 L2.140625,7.5625 C2.1875,6.9234375 2.3375,6.303125 2.5859375,5.7140625 Z M2.140625,8.4375 L4.3828125,8.4375 C4.4125,9.284375 4.525,10.0890625 4.70625,10.821875 C4.2484375,11.065625 3.821875,11.359375 3.4328125,11.6953125 C3.0859375,11.2671875 2.8015625,10.7953125 2.5859375,10.2859375 C2.3375,9.696875 2.1875,9.0765625 2.140625,8.4375 Z M5.7140625,13.4140625 C5.09375,13.1515625 4.5296875,12.7890625 4.0328125,12.3328125 C4.321875,12.0859375 4.6328125,11.86875 4.9609375,11.6796875 C5.20625,12.3828125 5.5203125,12.99375 5.8859375,13.4828125 C5.828125,13.4609375 5.7703125,13.4375 5.7140625,13.4140625 Z M10.2859375,13.4140625 C10.228125,13.4375 10.171875,13.4609375 10.1140625,13.4828125 C10.4796875,12.99375 10.79375,12.3828125 11.0390625,11.6796875 C11.3671875,11.8671875 11.678125,12.0859375 11.9671875,12.3328125 C11.4703125,12.7890625 10.90625,13.1515625 10.2859375,13.4140625 Z" id="Shape"></path>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 52.2 (67145) - http://www.bohemiancoding.com/sketch -->
<title>earth copy 53</title>
<desc>Created with Sketch.</desc>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="拓扑图编译器" transform="translate(-222.000000, -1591.000000)" fill="#FFFFFF" fill-rule="nonzero">
<g id="earth-copy-53" transform="translate(221.000000, 1590.000000)">
<rect id="Rectangle-path" opacity="0" x="0" y="0" width="16" height="16"></rect>
<path d="M13.35,12.5140625 C13.353125,12.509375 13.3578125,12.5046875 13.3609375,12.5 C14.384375,11.2828125 15,9.7140625 15,8 C15,6.2859375 14.384375,4.7171875 13.3625,3.5 C13.359375,3.4953125 13.3546875,3.4921875 13.3515625,3.4875 C13.334375,3.4671875 13.31875,3.4484375 13.3015625,3.4296875 C13.2953125,3.421875 13.2890625,3.415625 13.2828125,3.4078125 C13.2609375,3.3828125 13.240625,3.359375 13.21875,3.334375 L13.2171875,3.3328125 C13.19375,3.30625 13.16875,3.2796875 13.1453125,3.253125 L13.14375,3.2515625 C13.09375,3.1984375 13.04375,3.1453125 12.9921875,3.09375 L12.990625,3.0921875 L12.915625,3.0171875 L12.9109375,3.0125 C12.8875,2.9890625 12.8640625,2.9671875 12.840625,2.9453125 C12.8328125,2.9375 12.825,2.9296875 12.815625,2.921875 C12.8,2.90625 12.784375,2.8921875 12.76875,2.878125 C12.7640625,2.8734375 12.7578125,2.86875 12.753125,2.8625 C11.50625,1.70625 9.8359375,1 8,1 C6.1640625,1 4.49375,1.70625 3.2453125,2.8625 C3.240625,2.8671875 3.234375,2.871875 3.2296875,2.878125 C3.2140625,2.8921875 3.1984375,2.9078125 3.1828125,2.9234375 C3.175,2.93125 3.1671875,2.9390625 3.1578125,2.946875 C3.134375,2.96875 3.1109375,2.9921875 3.0875,3.0140625 L3.0828125,3.01875 L3.0078125,3.09375 L3.00625,3.0953125 C2.9546875,3.146875 2.9046875,3.2 2.8546875,3.253125 L2.853125,3.2546875 C2.828125,3.28125 2.8046875,3.3078125 2.78125,3.334375 L2.7796875,3.3359375 C2.7578125,3.359375 2.7359375,3.384375 2.715625,3.409375 C2.709375,3.4171875 2.703125,3.4234375 2.696875,3.43125 C2.6796875,3.45 2.6640625,3.4703125 2.646875,3.4890625 C2.64375,3.49375 2.6390625,3.496875 2.6359375,3.5015625 C1.615625,4.7171875 1,6.2859375 1,8 C1,9.7140625 1.615625,11.2828125 2.6375,12.5 C2.640625,12.5046875 2.6453125,12.509375 2.6484375,12.5140625 C2.6640625,12.5328125 2.68125,12.553125 2.696875,12.571875 C2.703125,12.5796875 2.709375,12.5859375 2.715625,12.59375 C2.7375,12.61875 2.7578125,12.6421875 2.7796875,12.6671875 C2.7796875,12.66875 2.78125,12.66875 2.78125,12.6703125 C2.8046875,12.696875 2.828125,12.7234375 2.853125,12.7484375 L2.8546875,12.75 C2.9046875,12.803125 2.9546875,12.85625 3.0046875,12.9078125 L3.00625,12.909375 C3.03125,12.934375 3.0546875,12.959375 3.0796875,12.9828125 L3.084375,12.9875 C3.1359375,13.0390625 3.1890625,13.0890625 3.2421875,13.1375 C4.49375,14.29375 6.1640625,15 8,15 C9.8359375,15 11.50625,14.29375 12.7546875,13.1375 C12.8078125,13.0890625 12.859375,13.0390625 12.9109375,12.9875 L12.915625,12.9828125 C12.940625,12.9578125 12.965625,12.934375 12.9890625,12.909375 L12.990625,12.9078125 C13.0421875,12.85625 13.0921875,12.803125 13.140625,12.75 L13.1421875,12.7484375 C13.165625,12.721875 13.190625,12.696875 13.2140625,12.6703125 C13.2140625,12.66875 13.215625,12.66875 13.215625,12.6671875 C13.2375,12.64375 13.259375,12.61875 13.2796875,12.59375 C13.2859375,12.5859375 13.2921875,12.5796875 13.2984375,12.571875 C13.3171875,12.5515625 13.334375,12.5328125 13.35,12.5140625 Z M13.4140625,10.2859375 C13.1984375,10.7953125 12.9140625,11.2671875 12.5671875,11.6953125 C12.178125,11.359375 11.7515625,11.065625 11.29375,10.821875 C11.475,10.0890625 11.5875,9.284375 11.6171875,8.4375 L13.859375,8.4375 C13.8125,9.0765625 13.6625,9.696875 13.4140625,10.2859375 Z M13.859375,7.5625 L11.6171875,7.5625 C11.5875,6.715625 11.475,5.9109375 11.29375,5.178125 C11.7515625,4.934375 12.178125,4.640625 12.5671875,4.3046875 C12.9140625,4.7328125 13.1984375,5.2046875 13.4140625,5.7140625 C13.6625,6.303125 13.8125,6.9234375 13.859375,7.5625 Z M10.2859375,2.5859375 C10.90625,2.8484375 11.4703125,3.2109375 11.9671875,3.6671875 C11.678125,3.9140625 11.3671875,4.13125 11.0390625,4.3203125 C10.79375,3.6171875 10.4796875,3.00625 10.1140625,2.5171875 C10.171875,2.5390625 10.2296875,2.5625 10.2859375,2.5859375 Z M8.8703125,13.5328125 C8.7265625,13.6453125 8.5828125,13.73125 8.4375,13.7890625 L8.4375,10.890625 C9.0609375,10.934375 9.665625,11.071875 10.2453125,11.3 C10.115625,11.684375 9.965625,12.0390625 9.7921875,12.359375 C9.5203125,12.865625 9.2015625,13.2703125 8.8703125,13.5328125 Z M9.7921875,3.640625 C9.9640625,3.9625 10.115625,4.3171875 10.2453125,4.7 C9.665625,4.928125 9.0609375,5.065625 8.4375,5.109375 L8.4375,2.2125 C8.58125,2.2703125 8.7265625,2.3546875 8.8703125,2.46875 C9.2015625,2.7296875 9.5203125,3.134375 9.7921875,3.640625 Z M8.4375,10.0140625 L8.4375,8.4375 L10.7421875,8.4375 C10.7171875,9.128125 10.63125,9.7984375 10.4875,10.434375 L10.4828125,10.453125 C9.840625,10.209375 9.153125,10.0578125 8.4375,10.0140625 Z M8.4375,7.5625 L8.4375,5.9859375 C9.153125,5.9421875 9.840625,5.790625 10.4828125,5.546875 L10.4875,5.565625 C10.63125,6.2015625 10.7171875,6.8703125 10.7421875,7.5625 L8.4375,7.5625 Z M7.5625,8.4375 L7.5625,10.0140625 C6.846875,10.0578125 6.159375,10.209375 5.5171875,10.453125 L5.5125,10.434375 C5.36875,9.7984375 5.2828125,9.1296875 5.2578125,8.4375 L7.5625,8.4375 Z M5.2578125,7.5625 C5.2828125,6.871875 5.36875,6.2015625 5.5125,5.565625 L5.5171875,5.546875 C6.159375,5.790625 6.8453125,5.9421875 7.5625,5.9859375 L7.5625,7.5625 L5.2578125,7.5625 Z M7.5625,10.890625 L7.5625,13.7875 C7.41875,13.7296875 7.2734375,13.6453125 7.1296875,13.53125 C6.7984375,13.2703125 6.478125,12.8640625 6.20625,12.3578125 C6.034375,12.0359375 5.8828125,11.68125 5.753125,11.2984375 C6.334375,11.0703125 6.9390625,10.934375 7.5625,10.890625 Z M7.5625,5.109375 C6.9390625,5.065625 6.334375,4.928125 5.7546875,4.7 C5.884375,4.315625 6.034375,3.9609375 6.2078125,3.640625 C6.4796875,3.134375 6.7984375,2.728125 7.13125,2.4671875 C7.275,2.3546875 7.41875,2.26875 7.5640625,2.2109375 L7.5640625,5.109375 L7.5625,5.109375 Z M5.7140625,2.5859375 C5.771875,2.5625 5.828125,2.5390625 5.8859375,2.5171875 C5.5203125,3.00625 5.20625,3.6171875 4.9609375,4.3203125 C4.6328125,4.1328125 4.321875,3.9140625 4.0328125,3.6671875 C4.5296875,3.2109375 5.09375,2.8484375 5.7140625,2.5859375 Z M2.5859375,5.7140625 C2.8015625,5.2046875 3.0859375,4.7328125 3.4328125,4.3046875 C3.821875,4.640625 4.2484375,4.934375 4.70625,5.178125 C4.525,5.9109375 4.4125,6.715625 4.3828125,7.5625 L2.140625,7.5625 C2.1875,6.9234375 2.3375,6.303125 2.5859375,5.7140625 Z M2.140625,8.4375 L4.3828125,8.4375 C4.4125,9.284375 4.525,10.0890625 4.70625,10.821875 C4.2484375,11.065625 3.821875,11.359375 3.4328125,11.6953125 C3.0859375,11.2671875 2.8015625,10.7953125 2.5859375,10.2859375 C2.3375,9.696875 2.1875,9.0765625 2.140625,8.4375 Z M5.7140625,13.4140625 C5.09375,13.1515625 4.5296875,12.7890625 4.0328125,12.3328125 C4.321875,12.0859375 4.6328125,11.86875 4.9609375,11.6796875 C5.20625,12.3828125 5.5203125,12.99375 5.8859375,13.4828125 C5.828125,13.4609375 5.7703125,13.4375 5.7140625,13.4140625 Z M10.2859375,13.4140625 C10.228125,13.4375 10.171875,13.4609375 10.1140625,13.4828125 C10.4796875,12.99375 10.79375,12.3828125 11.0390625,11.6796875 C11.3671875,11.8671875 11.678125,12.0859375 11.9671875,12.3328125 C11.4703125,12.7890625 10.90625,13.1515625 10.2859375,13.4140625 Z" id="Shape"></path>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="48px" height="48px" viewBox="0 0 48 48" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 52.2 (67145) - http://www.bohemiancoding.com/sketch -->
<title>Group 17</title>
<desc>Created with Sketch.</desc>
<defs>
<circle id="path-1" cx="20" cy="20" r="20"></circle>
<filter x="-17.5%" y="-12.5%" width="135.0%" height="135.0%" filterUnits="objectBoundingBox" id="filter-2">
<feOffset dx="0" dy="2" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feComposite in="shadowBlurOuter1" in2="SourceAlpha" operator="out" result="shadowBlurOuter1"></feComposite>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
</filter>
</defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="拓扑图编译器" transform="translate(-119.000000, -139.000000)">
<g id="Group-17" transform="translate(123.000000, 141.000000)">
<g id="Oval-Copy-9">
<use fill="black" fill-opacity="1" filter="url(#filter-2)" xlink:href="#path-1"></use>
<circle stroke="#5CDBD3" stroke-width="1" stroke-linejoin="square" fill-opacity="0.92" fill="#5CDBD3" fill-rule="evenodd" cx="20" cy="20" r="19.5"></circle>
</g>
<g id="earth-copy-7" transform="translate(12.000000, 12.000000)" fill="#FFFFFF" fill-rule="nonzero">
<rect id="Rectangle-path" opacity="0" x="0" y="0" width="16" height="16"></rect>
<path d="M13.35,12.5140625 C13.353125,12.509375 13.3578125,12.5046875 13.3609375,12.5 C14.384375,11.2828125 15,9.7140625 15,8 C15,6.2859375 14.384375,4.7171875 13.3625,3.5 C13.359375,3.4953125 13.3546875,3.4921875 13.3515625,3.4875 C13.334375,3.4671875 13.31875,3.4484375 13.3015625,3.4296875 C13.2953125,3.421875 13.2890625,3.415625 13.2828125,3.4078125 C13.2609375,3.3828125 13.240625,3.359375 13.21875,3.334375 L13.2171875,3.3328125 C13.19375,3.30625 13.16875,3.2796875 13.1453125,3.253125 L13.14375,3.2515625 C13.09375,3.1984375 13.04375,3.1453125 12.9921875,3.09375 L12.990625,3.0921875 L12.915625,3.0171875 L12.9109375,3.0125 C12.8875,2.9890625 12.8640625,2.9671875 12.840625,2.9453125 C12.8328125,2.9375 12.825,2.9296875 12.815625,2.921875 C12.8,2.90625 12.784375,2.8921875 12.76875,2.878125 C12.7640625,2.8734375 12.7578125,2.86875 12.753125,2.8625 C11.50625,1.70625 9.8359375,1 8,1 C6.1640625,1 4.49375,1.70625 3.2453125,2.8625 C3.240625,2.8671875 3.234375,2.871875 3.2296875,2.878125 C3.2140625,2.8921875 3.1984375,2.9078125 3.1828125,2.9234375 C3.175,2.93125 3.1671875,2.9390625 3.1578125,2.946875 C3.134375,2.96875 3.1109375,2.9921875 3.0875,3.0140625 L3.0828125,3.01875 L3.0078125,3.09375 L3.00625,3.0953125 C2.9546875,3.146875 2.9046875,3.2 2.8546875,3.253125 L2.853125,3.2546875 C2.828125,3.28125 2.8046875,3.3078125 2.78125,3.334375 L2.7796875,3.3359375 C2.7578125,3.359375 2.7359375,3.384375 2.715625,3.409375 C2.709375,3.4171875 2.703125,3.4234375 2.696875,3.43125 C2.6796875,3.45 2.6640625,3.4703125 2.646875,3.4890625 C2.64375,3.49375 2.6390625,3.496875 2.6359375,3.5015625 C1.615625,4.7171875 1,6.2859375 1,8 C1,9.7140625 1.615625,11.2828125 2.6375,12.5 C2.640625,12.5046875 2.6453125,12.509375 2.6484375,12.5140625 C2.6640625,12.5328125 2.68125,12.553125 2.696875,12.571875 C2.703125,12.5796875 2.709375,12.5859375 2.715625,12.59375 C2.7375,12.61875 2.7578125,12.6421875 2.7796875,12.6671875 C2.7796875,12.66875 2.78125,12.66875 2.78125,12.6703125 C2.8046875,12.696875 2.828125,12.7234375 2.853125,12.7484375 L2.8546875,12.75 C2.9046875,12.803125 2.9546875,12.85625 3.0046875,12.9078125 L3.00625,12.909375 C3.03125,12.934375 3.0546875,12.959375 3.0796875,12.9828125 L3.084375,12.9875 C3.1359375,13.0390625 3.1890625,13.0890625 3.2421875,13.1375 C4.49375,14.29375 6.1640625,15 8,15 C9.8359375,15 11.50625,14.29375 12.7546875,13.1375 C12.8078125,13.0890625 12.859375,13.0390625 12.9109375,12.9875 L12.915625,12.9828125 C12.940625,12.9578125 12.965625,12.934375 12.9890625,12.909375 L12.990625,12.9078125 C13.0421875,12.85625 13.0921875,12.803125 13.140625,12.75 L13.1421875,12.7484375 C13.165625,12.721875 13.190625,12.696875 13.2140625,12.6703125 C13.2140625,12.66875 13.215625,12.66875 13.215625,12.6671875 C13.2375,12.64375 13.259375,12.61875 13.2796875,12.59375 C13.2859375,12.5859375 13.2921875,12.5796875 13.2984375,12.571875 C13.3171875,12.5515625 13.334375,12.5328125 13.35,12.5140625 Z M13.4140625,10.2859375 C13.1984375,10.7953125 12.9140625,11.2671875 12.5671875,11.6953125 C12.178125,11.359375 11.7515625,11.065625 11.29375,10.821875 C11.475,10.0890625 11.5875,9.284375 11.6171875,8.4375 L13.859375,8.4375 C13.8125,9.0765625 13.6625,9.696875 13.4140625,10.2859375 Z M13.859375,7.5625 L11.6171875,7.5625 C11.5875,6.715625 11.475,5.9109375 11.29375,5.178125 C11.7515625,4.934375 12.178125,4.640625 12.5671875,4.3046875 C12.9140625,4.7328125 13.1984375,5.2046875 13.4140625,5.7140625 C13.6625,6.303125 13.8125,6.9234375 13.859375,7.5625 Z M10.2859375,2.5859375 C10.90625,2.8484375 11.4703125,3.2109375 11.9671875,3.6671875 C11.678125,3.9140625 11.3671875,4.13125 11.0390625,4.3203125 C10.79375,3.6171875 10.4796875,3.00625 10.1140625,2.5171875 C10.171875,2.5390625 10.2296875,2.5625 10.2859375,2.5859375 Z M8.8703125,13.5328125 C8.7265625,13.6453125 8.5828125,13.73125 8.4375,13.7890625 L8.4375,10.890625 C9.0609375,10.934375 9.665625,11.071875 10.2453125,11.3 C10.115625,11.684375 9.965625,12.0390625 9.7921875,12.359375 C9.5203125,12.865625 9.2015625,13.2703125 8.8703125,13.5328125 Z M9.7921875,3.640625 C9.9640625,3.9625 10.115625,4.3171875 10.2453125,4.7 C9.665625,4.928125 9.0609375,5.065625 8.4375,5.109375 L8.4375,2.2125 C8.58125,2.2703125 8.7265625,2.3546875 8.8703125,2.46875 C9.2015625,2.7296875 9.5203125,3.134375 9.7921875,3.640625 Z M8.4375,10.0140625 L8.4375,8.4375 L10.7421875,8.4375 C10.7171875,9.128125 10.63125,9.7984375 10.4875,10.434375 L10.4828125,10.453125 C9.840625,10.209375 9.153125,10.0578125 8.4375,10.0140625 Z M8.4375,7.5625 L8.4375,5.9859375 C9.153125,5.9421875 9.840625,5.790625 10.4828125,5.546875 L10.4875,5.565625 C10.63125,6.2015625 10.7171875,6.8703125 10.7421875,7.5625 L8.4375,7.5625 Z M7.5625,8.4375 L7.5625,10.0140625 C6.846875,10.0578125 6.159375,10.209375 5.5171875,10.453125 L5.5125,10.434375 C5.36875,9.7984375 5.2828125,9.1296875 5.2578125,8.4375 L7.5625,8.4375 Z M5.2578125,7.5625 C5.2828125,6.871875 5.36875,6.2015625 5.5125,5.565625 L5.5171875,5.546875 C6.159375,5.790625 6.8453125,5.9421875 7.5625,5.9859375 L7.5625,7.5625 L5.2578125,7.5625 Z M7.5625,10.890625 L7.5625,13.7875 C7.41875,13.7296875 7.2734375,13.6453125 7.1296875,13.53125 C6.7984375,13.2703125 6.478125,12.8640625 6.20625,12.3578125 C6.034375,12.0359375 5.8828125,11.68125 5.753125,11.2984375 C6.334375,11.0703125 6.9390625,10.934375 7.5625,10.890625 Z M7.5625,5.109375 C6.9390625,5.065625 6.334375,4.928125 5.7546875,4.7 C5.884375,4.315625 6.034375,3.9609375 6.2078125,3.640625 C6.4796875,3.134375 6.7984375,2.728125 7.13125,2.4671875 C7.275,2.3546875 7.41875,2.26875 7.5640625,2.2109375 L7.5640625,5.109375 L7.5625,5.109375 Z M5.7140625,2.5859375 C5.771875,2.5625 5.828125,2.5390625 5.8859375,2.5171875 C5.5203125,3.00625 5.20625,3.6171875 4.9609375,4.3203125 C4.6328125,4.1328125 4.321875,3.9140625 4.0328125,3.6671875 C4.5296875,3.2109375 5.09375,2.8484375 5.7140625,2.5859375 Z M2.5859375,5.7140625 C2.8015625,5.2046875 3.0859375,4.7328125 3.4328125,4.3046875 C3.821875,4.640625 4.2484375,4.934375 4.70625,5.178125 C4.525,5.9109375 4.4125,6.715625 4.3828125,7.5625 L2.140625,7.5625 C2.1875,6.9234375 2.3375,6.303125 2.5859375,5.7140625 Z M2.140625,8.4375 L4.3828125,8.4375 C4.4125,9.284375 4.525,10.0890625 4.70625,10.821875 C4.2484375,11.065625 3.821875,11.359375 3.4328125,11.6953125 C3.0859375,11.2671875 2.8015625,10.7953125 2.5859375,10.2859375 C2.3375,9.696875 2.1875,9.0765625 2.140625,8.4375 Z M5.7140625,13.4140625 C5.09375,13.1515625 4.5296875,12.7890625 4.0328125,12.3328125 C4.321875,12.0859375 4.6328125,11.86875 4.9609375,11.6796875 C5.20625,12.3828125 5.5203125,12.99375 5.8859375,13.4828125 C5.828125,13.4609375 5.7703125,13.4375 5.7140625,13.4140625 Z M10.2859375,13.4140625 C10.228125,13.4375 10.171875,13.4609375 10.1140625,13.4828125 C10.4796875,12.99375 10.79375,12.3828125 11.0390625,11.6796875 C11.3671875,11.8671875 11.678125,12.0859375 11.9671875,12.3328125 C11.4703125,12.7890625 10.90625,13.1515625 10.2859375,13.4140625 Z" id="Shape"></path>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
const generateMock = require('merge-umi-mock-data'); const generateMock = require('merge-umi-mock-data');
const path = require('path'); const path = require('path');
generateMock(path.join(__dirname, '../mock'), path.join(__dirname, '../functions/mock/index.js')); generateMock(path.join(__dirname, '../mock'), path.join(__dirname, '../lambda/mock/index.js'));
import { Icon } from 'antd';
const IconFont = Icon.createFromIconfontCN({
scriptUrl: 'https://at.alicdn.com/t/font_1101588_01zniftxm9yp.js',
});
export default IconFont;
{
"roots": [
{
"label": "法国",
"children": [
{
"label": "克罗地亚",
"side": "left",
"children": [
{
"label": "克罗地亚",
"children": [
{
"label": "克罗地亚",
"children": [
{
"label": "克罗地亚"
},
{
"label": "丹麦"
}
]
},
{
"label": "俄罗斯",
"children": [
{
"label": "俄罗斯"
},
{
"label": "西班牙"
}
]
}
]
},
{
"label": "英格兰",
"children": [
{
"label": "英格兰",
"children": [
{
"label": "英格兰"
},
{
"label": "哥伦比亚"
}
]
},
{
"label": "瑞典",
"children": [
{
"label": "瑞士"
},
{
"label": "瑞典"
}
]
}
]
}
]
},
{
"label": "法国",
"side": "right",
"children": [
{
"label": "法国",
"children": [
{
"label": "法国",
"children": [
{
"label": "法国"
},
{
"label": "阿根廷"
}
]
},
{
"label": "乌拉圭",
"children": [
{
"label": "乌拉圭"
},
{
"label": "葡萄牙"
}
]
}
]
},
{
"label": "比利时",
"children": [
{
"label": "比利时",
"children": [
{
"label": "比利时"
},
{
"label": "日本"
}
]
},
{
"label": "巴西",
"children": [
{
"label": "巴西"
},
{
"label": "墨西哥"
}
]
}
]
}
]
}
]
}
]
}
import React from 'react';
export interface ApplicationsProps {
data: {
content?: string;
updatedAt?: any;
avatar?: string;
owner?: string;
href?: string;
};
}
export default class ArticleListContent extends React.Component<ApplicationsProps, any> {}
import * as React from 'react'; import React from 'react';
import { RouteProps } from 'react-router'; import { RouteProps } from 'react-router';
type authorityFN = (currentAuthority?: string) => boolean; type authorityFN = (currentAuthority?: string) => boolean;
......
import React from 'react'; import React from 'react';
import { Route, Redirect } from 'react-router-dom'; import { Route, Redirect } from 'umi';
import Authorized from './Authorized'; import Authorized from './Authorized';
// TODO: umi只会返回render和rest // TODO: umi只会返回render和rest
......
...@@ -2,21 +2,13 @@ import React from 'react'; ...@@ -2,21 +2,13 @@ import React from 'react';
import PromiseRender from './PromiseRender'; import PromiseRender from './PromiseRender';
import { CURRENT } from './renderAuthorize'; import { CURRENT } from './renderAuthorize';
function isPromise(obj) {
return (
!!obj &&
(typeof obj === 'object' || typeof obj === 'function') &&
typeof obj.then === 'function'
);
}
/** /**
* 通用权限检查方法 * 通用权限检查方法
* Common check permissions method * Common check permissions method
* @param { 权限判定 Permission judgment type string |array | Promise | Function } authority * @param { 权限判定 | Permission judgment } authority
* @param { 你的权限 Your permission description type:string} currentAuthority * @param { 你的权限 | Your permission description } currentAuthority
* @param { 通过的组件 Passing components } target * @param { 通过的组件 | Passing components } target
* @param { 未通过的组件 no pass components } Exception * @param { 未通过的组件 | no pass components } Exception
*/ */
const checkPermissions = (authority, currentAuthority, target, Exception) => { const checkPermissions = (authority, currentAuthority, target, Exception) => {
// 没有判定权限.默认查看所有 // 没有判定权限.默认查看所有
...@@ -26,47 +18,36 @@ const checkPermissions = (authority, currentAuthority, target, Exception) => { ...@@ -26,47 +18,36 @@ const checkPermissions = (authority, currentAuthority, target, Exception) => {
} }
// 数组处理 // 数组处理
if (Array.isArray(authority)) { if (Array.isArray(authority)) {
if (authority.indexOf(currentAuthority) >= 0) {
return target;
}
if (Array.isArray(currentAuthority)) { if (Array.isArray(currentAuthority)) {
for (let i = 0; i < currentAuthority.length; i += 1) { if (currentAuthority.some(item => authority.includes(item))) {
const element = currentAuthority[i];
if (authority.indexOf(element) >= 0) {
return target; return target;
} }
} } else if (authority.includes(currentAuthority)) {
return target;
} }
return Exception; return Exception;
} }
// string 处理 // string 处理
if (typeof authority === 'string') { if (typeof authority === 'string') {
if (authority === currentAuthority) {
return target;
}
if (Array.isArray(currentAuthority)) { if (Array.isArray(currentAuthority)) {
for (let i = 0; i < currentAuthority.length; i += 1) { if (currentAuthority.some(item => authority === item)) {
const element = currentAuthority[i];
if (authority === element) {
return target; return target;
} }
} } else if (authority === currentAuthority) {
return target;
} }
return Exception; return Exception;
} }
// Promise 处理 // Promise 处理
if (isPromise(authority)) { if (authority instanceof Promise) {
return <PromiseRender ok={target} error={Exception} promise={authority} />; return <PromiseRender ok={target} error={Exception} promise={authority} />;
} }
// Function 处理 // Function 处理
if (typeof authority === 'function') { if (typeof authority === 'function') {
try { try {
const bool = authority(currentAuthority); const bool = authority(currentAuthority);
// 函数执行后返回值是 Promise // 函数执行后返回值是 Promise
if (isPromise(bool)) { if (bool instanceof Promise) {
return <PromiseRender ok={target} error={Exception} promise={bool} />; return <PromiseRender ok={target} error={Exception} promise={bool} />;
} }
if (bool) { if (bool) {
......
import React from 'react';
import { Spin } from 'antd'; import { Spin } from 'antd';
import isEqual from 'lodash/isEqual';
import React from 'react';
import { isComponentClass } from './Secured';
export default class PromiseRender extends React.PureComponent { export default class PromiseRender extends React.Component {
state = { state = {
component: null, component: null,
}; };
...@@ -10,10 +12,14 @@ export default class PromiseRender extends React.PureComponent { ...@@ -10,10 +12,14 @@ export default class PromiseRender extends React.PureComponent {
this.setRenderComponent(this.props); this.setRenderComponent(this.props);
} }
componentDidUpdate(nextProps) { shouldComponentUpdate = (nextProps, nextState) => {
// new Props enter const { component } = this.state;
if (!isEqual(nextProps, this.props)) {
this.setRenderComponent(nextProps); this.setRenderComponent(nextProps);
} }
if (nextState.component !== component) return true;
return false;
};
// set render Component : ok or error // set render Component : ok or error
setRenderComponent(props) { setRenderComponent(props) {
...@@ -37,8 +43,12 @@ export default class PromiseRender extends React.PureComponent { ...@@ -37,8 +43,12 @@ export default class PromiseRender extends React.PureComponent {
// Authorized render is already instantiated, children is no instantiated // Authorized render is already instantiated, children is no instantiated
// Secured is not instantiated // Secured is not instantiated
checkIsInstantiation = target => { checkIsInstantiation = target => {
if (!React.isValidElement(target)) { if (isComponentClass(target)) {
return target; const Target = target;
return props => <Target {...props} />;
}
if (React.isValidElement(target)) {
return props => React.cloneElement(target, props);
} }
return () => target; return () => target;
}; };
......
import React from 'react'; import React from 'react';
import Exception from '../Exception'; import Exception from '../Exception';
import CheckPermissions from './CheckPermissions'; import CheckPermissions from './CheckPermissions';
/** /**
* 默认不能访问任何页面 * 默认不能访问任何页面
* default is "NULL" * default is "NULL"
*/ */
const Exception403 = () => <Exception type="403" />; const Exception403 = () => <Exception type="403" />;
export const isComponentClass = component => {
if (!component) return false;
const proto = Object.getPrototypeOf(component);
if (proto === React.Component || proto === Function.prototype) return true;
return isComponentClass(proto);
};
// Determine whether the incoming component has been instantiated // Determine whether the incoming component has been instantiated
// AuthorizedRoute is already instantiated // AuthorizedRoute is already instantiated
// Authorized render is already instantiated, children is no instantiated // Authorized render is already instantiated, children is no instantiated
// Secured is not instantiated // Secured is not instantiated
const checkIsInstantiation = target => { const checkIsInstantiation = target => {
if (!React.isValidElement(target)) { if (isComponentClass(target)) {
return target; const Target = target;
return props => <Target {...props} />;
}
if (React.isValidElement(target)) {
return props => React.cloneElement(target, props);
} }
return () => target; return () => target;
}; };
/** /**
* 用于判断是否拥有权限访问此view权限 * 用于判断是否拥有权限访问此 view 权限
* authority 支持传入 string, function:()=>boolean|Promise * authority 支持传入 string, () => boolean | Promise
* e.g. 'user' 只有user用户能访问 * e.g. 'user' 只有 user 用户能访问
* e.g. 'user,admin' user和 admin 都能访问 * e.g. 'user,admin' user 和 admin 都能访问
* e.g. ()=>boolean 返回true能访问,返回false不能访问 * e.g. ()=>boolean 返回true能访问,返回false不能访问
* e.g. Promise then 能访问 catch不能访问 * e.g. Promise then 能访问 catch不能访问
* e.g. authority support incoming string, function: () => boolean | Promise * e.g. authority support incoming string, () => boolean | Promise
* e.g. 'user' only user user can access * e.g. 'user' only user user can access
* e.g. 'user, admin' user and admin can access * e.g. 'user, admin' user and admin can access
* e.g. () => boolean true to be able to visit, return false can not be accessed * e.g. () => boolean true to be able to visit, return false can not be accessed
......
...@@ -16,7 +16,9 @@ const { Secured } = RenderAuthorized('user'); ...@@ -16,7 +16,9 @@ const { Secured } = RenderAuthorized('user');
@Secured('admin') @Secured('admin')
class TestSecuredString extends React.Component { class TestSecuredString extends React.Component {
render() { render() {
<Alert message="user Passed!" type="success" showIcon />; return (
<Alert message="user Passed!" type="success" showIcon />
)
} }
} }
ReactDOM.render( ReactDOM.render(
......
import * as React from 'react'; import React from 'react';
import AuthorizedRoute, { authority } from './AuthorizedRoute'; import AuthorizedRoute, { authority } from './AuthorizedRoute';
export type IReactComponent<P = any> = export type IReactComponent<P = any> =
| React.StatelessComponent<P> | React.StatelessComponent<P>
......
import * as React from 'react'; import React from 'react';
export interface IAvatarItemProps {
export declare type SizeType = number | 'small' | 'default' | 'large';
export interface AvatarItemProps {
tips: React.ReactNode; tips: React.ReactNode;
src: string; src: string;
size?: SizeType;
style?: React.CSSProperties; style?: React.CSSProperties;
onClick?: () => void;
} }
export default class AvatarItem extends React.Component<IAvatarItemProps, any> { export default class AvatarItem extends React.Component<AvatarItemProps, any> {
constructor(props: IAvatarItemProps); constructor(props: AvatarItemProps);
} }
import * as React from 'react'; import React from 'react';
import AvatarItem from './AvatarItem'; import AvatarItem, { AvatarItemProps, SizeType } from './AvatarItem';
export interface IAvatarListProps { export interface AvatarListProps {
size?: 'large' | 'small' | 'mini' | 'default'; Item?: React.ReactElement<AvatarItemProps>;
size?: SizeType;
maxLength?: number; maxLength?: number;
excessItemsStyle?: React.CSSProperties; excessItemsStyle?: React.CSSProperties;
style?: React.CSSProperties; style?: React.CSSProperties;
children: React.ReactElement<AvatarItem> | Array<React.ReactElement<AvatarItem>>; children: React.ReactElement<AvatarItemProps> | Array<React.ReactElement<AvatarItemProps>>;
} }
export default class AvatarList extends React.Component<AvatarListProps, any> {
export default class AvatarList extends React.Component<IAvatarListProps, any> {
public static Item: typeof AvatarItem; public static Item: typeof AvatarItem;
} }
import React from 'react';
import PageLoading from '../PageLoading';
import { importCDN } from '@/utils/utils';
let isLoaderBizChart = false;
const loadBizCharts = async () => {
if (isLoaderBizChart) {
return Promise.resolve(true);
}
await Promise.all([
importCDN('//gw.alipayobjects.com/os/lib/bizcharts/3.4.3/umd/BizCharts.min.js'),
importCDN('//gw.alipayobjects.com/os/lib/antv/data-set/0.10.1/dist/data-set.min.js'),
]);
// eslint-disable-next-line no-console
console.log('bizCharts load success');
isLoaderBizChart = true;
return Promise.resolve(true);
};
class AsyncLoadBizCharts extends React.Component {
state = {
loading: !isLoaderBizChart,
};
async componentDidMount() {
await loadBizCharts();
requestAnimationFrame(() => {
this.setState({
loading: false,
});
});
}
render() {
const { children } = this.props;
const { loading } = this.state;
if (!loading) {
return children;
}
return <PageLoading />;
}
}
export { loadBizCharts, AsyncLoadBizCharts };
import * as React from 'react'; import React from 'react';
export interface IBarProps { export interface IBarProps {
title: React.ReactNode; title: React.ReactNode;
color?: string; color?: string;
......
import { CardProps } from 'antd/lib/card'; import { CardProps } from 'antd/lib/card';
import * as React from 'react'; import React from 'react';
export interface IChartCardProps extends CardProps { export interface IChartCardProps extends CardProps {
title: React.ReactNode; title: React.ReactNode;
......
import * as React from 'react'; import React from 'react';
export interface IFieldProps { export interface IFieldProps {
label: React.ReactNode; label: React.ReactNode;
value: React.ReactNode; value: React.ReactNode;
......
import * as React from 'react'; import React from 'react';
export interface IGaugeProps { export interface IGaugeProps {
title: React.ReactNode; title: React.ReactNode;
color?: string; color?: string;
......
...@@ -146,7 +146,7 @@ class Gauge extends React.Component { ...@@ -146,7 +146,7 @@ class Gauge extends React.Component {
<div style="width: 300px;text-align: center;font-size: 12px!important;"> <div style="width: 300px;text-align: center;font-size: 12px!important;">
<p style="font-size: 14px; color: rgba(0,0,0,0.43);margin: 0;">${title}</p> <p style="font-size: 14px; color: rgba(0,0,0,0.43);margin: 0;">${title}</p>
<p style="font-size: 24px;color: rgba(0,0,0,0.85);margin: 0;"> <p style="font-size: 24px;color: rgba(0,0,0,0.85);margin: 0;">
${data[0].value * 10}% ${(data[0].value * 10).toFixed(2)}%
</p> </p>
</div>`} </div>`}
/> />
......
import * as React from 'react'; import React from 'react';
// g2已经更新到3.0 // g2已经更新到3.0
// 不带的写了 // 不带的写了
......
import * as React from 'react'; import React from 'react';
export interface IMiniBarProps { export interface IMiniBarProps {
color?: string; color?: string;
height: number; height: number;
......
import * as React from 'react'; import React from 'react';
export interface IMiniProgressProps { export interface IMiniProgressProps {
target: number; target: number;
targetLabel: string;
color?: string; color?: string;
strokeWidth?: number; strokeWidth?: number;
percent?: number; percent?: number;
......
import React from 'react'; import React from 'react';
import { Tooltip } from 'antd'; import { Tooltip } from 'antd';
import styles from './index.less'; import styles from './index.less';
const MiniProgress = ({ target, color = 'rgb(19, 194, 194)', strokeWidth, percent }) => ( const MiniProgress = ({
targetLabel,
target,
color = 'rgb(19, 194, 194)',
strokeWidth,
percent,
}) => {
return (
<div className={styles.miniProgress}> <div className={styles.miniProgress}>
<Tooltip title={`目标值: ${target}%`}> <Tooltip title={targetLabel}>
<div className={styles.target} style={{ left: target ? `${target}%` : null }}> <div className={styles.target} style={{ left: target ? `${target}%` : null }}>
<span style={{ backgroundColor: color || null }} /> <span style={{ backgroundColor: color || null }} />
<span style={{ backgroundColor: color || null }} /> <span style={{ backgroundColor: color || null }} />
...@@ -22,6 +28,7 @@ const MiniProgress = ({ target, color = 'rgb(19, 194, 194)', strokeWidth, percen ...@@ -22,6 +28,7 @@ const MiniProgress = ({ target, color = 'rgb(19, 194, 194)', strokeWidth, percen
/> />
</div> </div>
</div> </div>
); );
};
export default MiniProgress; export default MiniProgress;
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
position: absolute; position: absolute;
top: 0; top: 0;
bottom: 0; bottom: 0;
z-index: 9;
width: 20px;
span { span {
position: absolute; position: absolute;
top: 0; top: 0;
......
import * as React from 'react'; import React from 'react';
export interface IPieProps { export interface IPieProps {
animate?: boolean; animate?: boolean;
color?: string; color?: string;
......
import * as React from 'react'; import React from 'react';
export interface IRadarProps { export interface IRadarProps {
title?: React.ReactNode; title?: React.ReactNode;
height: number; height: number;
......
import * as React from 'react'; import React from 'react';
export interface ITagCloudProps { export interface ITagCloudProps {
data: Array<{ data: Array<{
name: string; name: string;
......
...@@ -51,9 +51,7 @@ class TagCloud extends Component { ...@@ -51,9 +51,7 @@ class TagCloud extends Component {
initTagCloud = () => { initTagCloud = () => {
function getTextAttrs(cfg) { function getTextAttrs(cfg) {
return Object.assign( return Object.assign({}, cfg.style, {
{},
{
fillOpacity: cfg.opacity, fillOpacity: cfg.opacity,
fontSize: cfg.origin._origin.size, fontSize: cfg.origin._origin.size,
rotate: cfg.origin._origin.rotate, rotate: cfg.origin._origin.rotate,
...@@ -62,9 +60,7 @@ class TagCloud extends Component { ...@@ -62,9 +60,7 @@ class TagCloud extends Component {
fontFamily: cfg.origin._origin.font, fontFamily: cfg.origin._origin.font,
fill: cfg.color, fill: cfg.color,
textBaseline: 'Alphabetic', textBaseline: 'Alphabetic',
}, });
cfg.style
);
} }
// 给point注册一个词云的shape // 给point注册一个词云的shape
......
import * as React from 'react'; import React from 'react';
export interface ITimelineChartProps { export interface ITimelineChartProps {
data: Array<{ data: Array<{
x: number; x: number;
......
import * as React from 'react'; import React from 'react';
export interface IWaterWaveProps { export interface IWaterWaveProps {
title: React.ReactNode; title: React.ReactNode;
color?: string; color?: string;
......
import React, { Suspense } from 'react';
import numeral from 'numeral'; import numeral from 'numeral';
import ChartCard from './ChartCard'; import ChartCard from './ChartCard';
import Field from './Field'; import Field from './Field';
import Bar from './Bar';
const getComponent = Component => { import Pie from './Pie';
return props => { import Radar from './Radar';
return ( import Gauge from './Gauge';
<Suspense fallback="..."> import MiniArea from './MiniArea';
<Component {...props} /> import MiniBar from './MiniBar';
</Suspense> import MiniProgress from './MiniProgress';
); import WaterWave from './WaterWave';
}; import TagCloud from './TagCloud';
}; import TimelineChart from './TimelineChart';
const Bar = getComponent(React.lazy(() => import('./Bar')));
const Pie = getComponent(React.lazy(() => import('./Pie')));
const Radar = getComponent(React.lazy(() => import('./Radar')));
const Gauge = getComponent(React.lazy(() => import('./Gauge')));
const MiniArea = getComponent(React.lazy(() => import('./MiniArea')));
const MiniBar = getComponent(React.lazy(() => import('./MiniBar')));
const MiniProgress = getComponent(React.lazy(() => import('./MiniProgress')));
const WaterWave = getComponent(React.lazy(() => import('./WaterWave')));
const TagCloud = getComponent(React.lazy(() => import('./TagCloud')));
const TimelineChart = getComponent(React.lazy(() => import('./TimelineChart')));
const yuan = val => ${numeral(val).format('0,0')}`; const yuan = val => ${numeral(val).format('0,0')}`;
......
import * as React from 'react'; import React from 'react';
export interface ICountDownProps { export interface ICountDownProps {
format?: (time: number) => void; format?: (time: number) => void;
target: Date | number; target: Date | number;
......
import * as React from 'react'; import React from 'react';
import { ColProps } from 'antd/es/col';
export default class Description extends React.Component< export interface DescriptionProps extends ColProps {
{ column?: number;
term: React.ReactNode; key?: string | number;
style?: React.CSSProperties; style?: React.CSSProperties;
}, term?: React.ReactNode;
any }
> {}
export default class Description extends React.Component<DescriptionProps, any> {}
import * as React from 'react'; import React from 'react';
import Description from './Description'; import Description, { DescriptionProps } from './Description';
export interface IDescriptionListProps { export interface DescriptionListProps {
layout?: 'horizontal' | 'vertical'; className?: string;
col?: number; col?: number;
title: React.ReactNode; description?: DescriptionProps[];
gutter?: number; gutter?: number;
layout?: 'horizontal' | 'vertical';
size?: 'large' | 'small'; size?: 'large' | 'small';
style?: React.CSSProperties; style?: React.CSSProperties;
title?: React.ReactNode;
} }
export default class DescriptionList extends React.Component<IDescriptionListProps, any> { export default class DescriptionList extends React.Component<DescriptionListProps, any> {
public static Description: typeof Description; public static Description: typeof Description;
} }
...@@ -8,6 +8,14 @@ ...@@ -8,6 +8,14 @@
overflow: hidden; overflow: hidden;
} }
} }
// fix margin top error of following descriptionList
& + & {
:global {
.ant-row {
margin-top: 16px;
}
}
}
.title { .title {
margin-bottom: 16px; margin-bottom: 16px;
...@@ -47,6 +55,14 @@ ...@@ -47,6 +55,14 @@
margin-bottom: -8px; margin-bottom: -8px;
} }
} }
// fix margin top error of following descriptionList
& + .descriptionList {
:global {
.ant-row {
margin-top: 8px;
}
}
}
.title { .title {
margin-bottom: 12px; margin-bottom: 12px;
color: @text-color; color: @text-color;
......
import React from 'react';
export interface EditableItemProps {
onChange?: (value?: string | string[] | number) => void;
}
export default class EditableItem extends React.Component<EditableItemProps, any> {}
import React from 'react';
export interface EditableLinkGroupProps {
links: any[];
onAdd: () => void;
linkElement: string;
}
export default class EditableLinkGroup extends React.Component<EditableLinkGroupProps, any> {}
import React from 'react';
import { NodeMenu, EdgeMenu, GroupMenu, MultiMenu, CanvasMenu, ContextMenu } from 'gg-editor';
import MenuItem from './MenuItem';
import styles from './index.less';
const FlowContextMenu = () => {
return (
<ContextMenu className={styles.contextMenu}>
<NodeMenu>
<MenuItem command="copy" />
<MenuItem command="delete" />
</NodeMenu>
<EdgeMenu>
<MenuItem command="delete" />
</EdgeMenu>
<GroupMenu>
<MenuItem command="copy" />
<MenuItem command="delete" />
<MenuItem command="unGroup" icon="ungroup" text="Ungroup" />
</GroupMenu>
<MultiMenu>
<MenuItem command="copy" />
<MenuItem command="paste" />
<MenuItem command="addGroup" icon="group" text="Add Group" />
<MenuItem command="delete" />
</MultiMenu>
<CanvasMenu>
<MenuItem command="undo" />
<MenuItem command="redo" />
<MenuItem command="pasteHere" icon="paste" text="Paste Here" />
</CanvasMenu>
</ContextMenu>
);
};
export default FlowContextMenu;
import FlowContextMenu from './FlowContextMenu';
export default FlowContextMenu;
import React from 'react';
import { Command } from 'gg-editor';
import upperFirst from 'lodash/upperFirst';
import IconFont from '../../common/IconFont';
import styles from './index.less';
const MenuItem = props => {
const { command, icon, text } = props;
return (
<Command name={command}>
<div className={styles.item}>
<IconFont type={`icon-${icon || command}`} />
<span>{text || upperFirst(command)}</span>
</div>
</Command>
);
};
export default MenuItem;
import React from 'react';
import { NodeMenu, CanvasMenu, ContextMenu } from 'gg-editor';
import MenuItem from './MenuItem';
import styles from './index.less';
const MindContextMenu = () => {
return (
<ContextMenu className={styles.contextMenu}>
<NodeMenu>
<MenuItem command="append" text="Topic" />
<MenuItem command="appendChild" icon="append-child" text="Subtopic" />
<MenuItem command="collapse" text="Fold" />
<MenuItem command="expand" text="Unfold" />
<MenuItem command="delete" />
</NodeMenu>
<CanvasMenu>
<MenuItem command="undo" />
<MenuItem command="redo" />
</CanvasMenu>
</ContextMenu>
);
};
export default MindContextMenu;
import FlowContextMenu from './FlowContextMenu';
import MindContextMenu from './MindContextMenu';
import KoniContextMenu from './KoniContextMenu';
export { FlowContextMenu, MindContextMenu, KoniContextMenu };
.contextMenu {
display: none;
overflow: hidden;
background: #fff;
border-radius: 4px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
.item {
display: flex;
align-items: center;
padding: 5px 12px;
cursor: pointer;
transition: all 0.3s;
user-select: none;
&:hover {
background: #e6f7ff;
}
i {
margin-right: 8px;
}
}
:global {
.disable {
:local {
.item {
color: rgba(0, 0, 0, 0.25);
cursor: auto;
&:hover {
background: #fff;
}
}
}
}
}
}
import React, { Fragment } from 'react';
import { Card, Form, Input, Select } from 'antd';
import { withPropsAPI } from 'gg-editor';
import upperFirst from 'lodash/upperFirst';
const { Item } = Form;
const { Option } = Select;
const inlineFormItemLayout = {
labelCol: {
sm: { span: 8 },
},
wrapperCol: {
sm: { span: 16 },
},
};
class DetailForm extends React.Component {
get item() {
const { propsAPI } = this.props;
return propsAPI.getSelected()[0];
}
handleSubmit = e => {
if (e && e.preventDefault) {
e.preventDefault();
}
const { form, propsAPI } = this.props;
const { getSelected, executeCommand, update } = propsAPI;
setTimeout(() => {
form.validateFieldsAndScroll((err, values) => {
if (err) {
return;
}
const item = getSelected()[0];
if (!item) {
return;
}
executeCommand(() => {
update(item, {
...values,
});
});
});
}, 0);
};
renderEdgeShapeSelect = () => {
return (
<Select onChange={this.handleSubmit}>
<Option value="flow-smooth">Smooth</Option>
<Option value="flow-polyline">Polyline</Option>
<Option value="flow-polyline-round">Polyline Round</Option>
</Select>
);
};
renderNodeDetail = () => {
const { form } = this.props;
const { label } = this.item.getModel();
return (
<Item label="Label" {...inlineFormItemLayout}>
{form.getFieldDecorator('label', {
initialValue: label,
})(<Input onBlur={this.handleSubmit} />)}
</Item>
);
};
renderEdgeDetail = () => {
const { form } = this.props;
const { label = '', shape = 'flow-smooth' } = this.item.getModel();
return (
<Fragment>
<Item label="Label" {...inlineFormItemLayout}>
{form.getFieldDecorator('label', {
initialValue: label,
})(<Input onBlur={this.handleSubmit} />)}
</Item>
<Item label="Shape" {...inlineFormItemLayout}>
{form.getFieldDecorator('shape', {
initialValue: shape,
})(this.renderEdgeShapeSelect())}
</Item>
</Fragment>
);
};
renderGroupDetail = () => {
const { form } = this.props;
const { label = '新建分组' } = this.item.getModel();
return (
<Item label="Label" {...inlineFormItemLayout}>
{form.getFieldDecorator('label', {
initialValue: label,
})(<Input onBlur={this.handleSubmit} />)}
</Item>
);
};
render() {
const { type } = this.props;
if (!this.item) {
return null;
}
return (
<Card type="inner" size="small" title={upperFirst(type)} bordered={false}>
<Form onSubmit={this.handleSubmit}>
{type === 'node' && this.renderNodeDetail()}
{type === 'edge' && this.renderEdgeDetail()}
{type === 'group' && this.renderGroupDetail()}
</Form>
</Card>
);
}
}
export default Form.create()(withPropsAPI(DetailForm));
import React from 'react';
import { Card } from 'antd';
import { NodePanel, EdgePanel, GroupPanel, MultiPanel, CanvasPanel, DetailPanel } from 'gg-editor';
import DetailForm from './DetailForm';
import styles from './index.less';
const FlowDetailPanel = () => {
return (
<DetailPanel className={styles.detailPanel}>
<NodePanel>
<DetailForm type="node" />
</NodePanel>
<EdgePanel>
<DetailForm type="edge" />
</EdgePanel>
<GroupPanel>
<DetailForm type="group" />
</GroupPanel>
<MultiPanel>
<Card type="inner" size="small" title="Multi Select" bordered={false} />
</MultiPanel>
<CanvasPanel>
<Card type="inner" size="small" title="Canvas" bordered={false} />
</CanvasPanel>
</DetailPanel>
);
};
export default FlowDetailPanel;
import FlowDetailPanel from './FlowDetailPanel';
export default FlowDetailPanel;
import React from 'react';
import { Card } from 'antd';
import { NodePanel, CanvasPanel, DetailPanel } from 'gg-editor';
import DetailForm from './DetailForm';
import styles from './index.less';
const MindDetailPanel = () => {
return (
<DetailPanel className={styles.detailPanel}>
<NodePanel>
<DetailForm type="node" />
</NodePanel>
<CanvasPanel>
<Card type="inner" size="small" title="Canvas" bordered={false} />
</CanvasPanel>
</DetailPanel>
);
};
export default MindDetailPanel;
import FlowDetailPanel from './FlowDetailPanel';
import MindDetailPanel from './MindDetailPanel';
import KoniDetailPanel from './KoniDetailPanel';
export { FlowDetailPanel, MindDetailPanel, KoniDetailPanel };
.detailPanel {
flex: 1;
background: #fafafa;
:global {
.ant-card {
background: #fafafa;
}
}
}
import React from 'react';
import { Card } from 'antd';
import { ItemPanel, Item } from 'gg-editor';
import styles from './index.less';
const FlowItemPanel = () => {
return (
<ItemPanel className={styles.itemPanel}>
<Card bordered={false}>
<Item
type="node"
size="72*72"
shape="flow-circle"
model={{
color: '#FA8C16',
label: 'Start',
}}
src="/ggeditor/flow/start.svg"
/>
<Item
type="node"
size="80*48"
shape="flow-rect"
model={{
color: '#1890FF',
label: 'Normal',
}}
src="/ggeditor/flow/normal.svg"
/>
<Item
type="node"
size="80*72"
shape="flow-rhombus"
model={{
color: '#13C2C2',
label: 'Decision',
}}
src="/ggeditor/flow/decision.svg"
/>
<Item
type="node"
size="80*48"
shape="flow-capsule"
model={{
color: '#722ED1',
label: 'Model',
}}
src="/ggeditor/flow/model.svg"
/>
</Card>
</ItemPanel>
);
};
export default FlowItemPanel;
import React from 'react';
import { Card } from 'antd';
import { ItemPanel, Item } from 'gg-editor';
import styles from './index.less';
const KoniItemPanel = () => {
return (
<ItemPanel className={styles.itemPanel}>
<Card bordered={false}>
<Item
type="node"
size="40"
shape="koni-custom-node"
model={{
color: '#69C0FF',
label: 'Bank',
labelOffsetY: 28,
icon: '/ggeditor/koni/icon.svg',
}}
src="/ggeditor/koni/bank.svg"
/>
<Item
type="node"
size="40"
shape="koni-custom-node"
model={{
color: '#5CDBD3',
label: 'Person',
labelOffsetY: 28,
icon: '/ggeditor/koni/icon.svg',
}}
src="/ggeditor/koni/person.svg"
/>
<Item
type="node"
size="40"
shape="koni-custom-node"
model={{
color: '#B37FEB',
label: 'Country',
labelOffsetY: 28,
icon: '/ggeditor/koni/icon.svg',
}}
src="/ggeditor/koni/country.svg"
/>
</Card>
</ItemPanel>
);
};
export default KoniItemPanel;
import FlowItemPanel from './FlowItemPanel';
import KoniItemPanel from './KoniItemPanel';
export { FlowItemPanel, KoniItemPanel };
.itemPanel {
flex: 1;
background: #fafafa;
:global {
.ant-card {
background: #fafafa;
}
.ant-card-body {
display: flex;
flex-direction: column;
align-items: center;
> div {
margin-bottom: 16px;
}
}
}
}
import React from 'react';
import { RegisterNode } from 'gg-editor';
class KoniCustomNode extends React.Component {
render() {
const config = {
draw(item) {
const keyShape = this.drawKeyShape(item);
// draw label
this.drawLabel(item);
// draw image
const group = item.getGraphicGroup();
const model = item.getModel();
group.addShape('image', {
attrs: {
x: -7,
y: -7,
img: model.icon,
},
});
return keyShape;
},
};
return <RegisterNode name="koni-custom-node" config={config} />;
}
}
export default KoniCustomNode;
import React from 'react';
import { Card } from 'antd';
import { Minimap } from 'gg-editor';
const EditorMinimap = () => {
return (
<Card type="inner" size="small" title="Minimap" bordered={false}>
<Minimap height={200} />
</Card>
);
};
export default EditorMinimap;
import React from 'react';
import { Divider } from 'antd';
import { Toolbar } from 'gg-editor';
import ToolbarButton from './ToolbarButton';
import styles from './index.less';
const FlowToolbar = () => {
return (
<Toolbar className={styles.toolbar}>
<ToolbarButton command="undo" />
<ToolbarButton command="redo" />
<Divider type="vertical" />
<ToolbarButton command="copy" />
<ToolbarButton command="paste" />
<ToolbarButton command="delete" />
<Divider type="vertical" />
<ToolbarButton command="zoomIn" icon="zoom-in" text="Zoom In" />
<ToolbarButton command="zoomOut" icon="zoom-out" text="Zoom Out" />
<ToolbarButton command="autoZoom" icon="fit-map" text="Fit Map" />
<ToolbarButton command="resetZoom" icon="actual-size" text="Actual Size" />
<Divider type="vertical" />
<ToolbarButton command="toBack" icon="to-back" text="To Back" />
<ToolbarButton command="toFront" icon="to-front" text="To Front" />
<Divider type="vertical" />
<ToolbarButton command="multiSelect" icon="multi-select" text="Multi Select" />
<ToolbarButton command="addGroup" icon="group" text="Add Group" />
<ToolbarButton command="unGroup" icon="ungroup" text="Ungroup" />
</Toolbar>
);
};
export default FlowToolbar;
import FlowToolbar from './FlowToolbar';
export default FlowToolbar;
import React from 'react';
import { Divider } from 'antd';
import { Toolbar } from 'gg-editor';
import ToolbarButton from './ToolbarButton';
import styles from './index.less';
const FlowToolbar = () => {
return (
<Toolbar className={styles.toolbar}>
<ToolbarButton command="undo" />
<ToolbarButton command="redo" />
<Divider type="vertical" />
<ToolbarButton command="zoomIn" icon="zoom-in" text="Zoom In" />
<ToolbarButton command="zoomOut" icon="zoom-out" text="Zoom Out" />
<ToolbarButton command="autoZoom" icon="fit-map" text="Fit Map" />
<ToolbarButton command="resetZoom" icon="actual-size" text="Actual Size" />
<Divider type="vertical" />
<ToolbarButton command="append" text="Topic" />
<ToolbarButton command="appendChild" icon="append-child" text="Subtopic" />
<Divider type="vertical" />
<ToolbarButton command="collapse" text="Fold" />
<ToolbarButton command="expand" text="Unfold" />
</Toolbar>
);
};
export default FlowToolbar;
import React from 'react';
import { Tooltip } from 'antd';
import { Command } from 'gg-editor';
import upperFirst from 'lodash/upperFirst';
import IconFont from '../../common/IconFont';
import styles from './index.less';
const ToolbarButton = props => {
const { command, icon, text } = props;
return (
<Command name={command}>
<Tooltip
title={text || upperFirst(command)}
placement="bottom"
overlayClassName={styles.tooltip}
>
<IconFont type={`icon-${icon || command}`} />
</Tooltip>
</Command>
);
};
export default ToolbarButton;
import FlowToolbar from './FlowToolbar';
import MindToolbar from './MindToolbar';
import KoniToolbar from './KoniToolbar';
export { FlowToolbar, MindToolbar, KoniToolbar };
.toolbar {
display: flex;
align-items: center;
:global {
.command i {
display: inline-block;
width: 27px;
height: 27px;
margin: 0 6px;
padding-top: 6px;
text-align: center;
border: 1px solid #fff;
cursor: pointer;
&:hover {
border: 1px solid #e6e9ed;
}
}
.disable i {
color: rgba(0, 0, 0, 0.25);
cursor: auto;
&:hover {
border: 1px solid #fff;
}
}
}
}
.tooltip {
:global {
.ant-tooltip-inner {
font-size: 12px;
border-radius: 0;
}
}
}
import * as React from 'react'; import React from 'react';
import { TooltipProps } from 'antd/lib/tooltip'; import { TooltipProps } from 'antd/lib/tooltip';
export interface IEllipsisTooltipProps extends TooltipProps { export interface EllipsisTooltipProps extends TooltipProps {
title?: undefined; title?: undefined;
overlayStyle?: undefined; overlayStyle?: undefined;
} }
export interface IEllipsisProps { export interface EllipsisProps {
tooltip?: boolean | IEllipsisTooltipProps; tooltip?: boolean | EllipsisTooltipProps;
length?: number; length?: number;
lines?: number; lines?: number;
style?: React.CSSProperties; style?: React.CSSProperties;
...@@ -18,4 +18,4 @@ export interface IEllipsisProps { ...@@ -18,4 +18,4 @@ export interface IEllipsisProps {
export function getStrFullLength(str: string): number; export function getStrFullLength(str: string): number;
export function cutStrByFullLength(str: string, maxLength: number): string; export function cutStrByFullLength(str: string, maxLength: number): string;
export default class Ellipsis extends React.Component<IEllipsisProps, any> {} export default class Ellipsis extends React.Component<EllipsisProps, any> {}
import * as React from 'react'; import React from 'react';
export interface IExceptionProps { import * as H from 'history';
export interface ExceptionProps<
L = {
to: H.LocationDescriptor;
href?: H.LocationDescriptor;
replace?: boolean;
innerRef?: (node: HTMLAnchorElement | null) => void;
}
> {
type?: '403' | '404' | '500'; type?: '403' | '404' | '500';
title?: React.ReactNode; title?: React.ReactNode;
desc?: React.ReactNode; desc?: React.ReactNode;
img?: string; img?: string;
actions?: React.ReactNode; actions?: React.ReactNode;
linkElement?: string | React.ComponentType; linkElement?: string | React.ComponentType<L>;
style?: React.CSSProperties; style?: React.CSSProperties;
className?: string; className?: string;
backText?: React.ReactNode; backText?: React.ReactNode;
redirect?: string; redirect?: string;
} }
export default class Exception extends React.Component<ExceptionProps, any> {}
export default class Exception extends React.Component<IExceptionProps, any> {}
import * as React from 'react'; import React from 'react';
export interface IFooterToolbarProps { export interface FooterToolbarProps {
extra: React.ReactNode; extra: React.ReactNode;
style?: React.CSSProperties; style?: React.CSSProperties;
className?: string;
} }
export default class FooterToolbar extends React.Component<IFooterToolbarProps, any> {} export default class FooterToolbar extends React.Component<FooterToolbarProps, any> {}
import * as React from 'react'; import React from 'react';
export interface IGlobalFooterProps { export interface GlobalFooterProps {
links?: Array<{ links?: Array<{
key?: string; key?: string;
title: React.ReactNode; title: React.ReactNode;
...@@ -8,6 +8,7 @@ export interface IGlobalFooterProps { ...@@ -8,6 +8,7 @@ export interface IGlobalFooterProps {
}>; }>;
copyright?: React.ReactNode; copyright?: React.ReactNode;
style?: React.CSSProperties; style?: React.CSSProperties;
className?: string;
} }
export default class GlobalFooter extends React.Component<IGlobalFooterProps, any> {} export default class GlobalFooter extends React.Component<GlobalFooterProps, any> {}
import React from 'react';
import { DropDownProps } from 'antd/lib/dropdown';
import { ClickParam } from 'antd/es/menu';
import { SiderTheme } from 'antd/es/Layout/Sider';
export interface GlobalHeaderRightProps {
notices?: any[];
dispatch?: (args: any) => void;
currentUser?: {
avatar?: string;
name?: string;
title?: string;
group?: string;
signature?: string;
geographic?: any;
tags?: any[];
unreadCount: number;
};
fetchingNotices?: boolean;
onNoticeVisibleChange?: (visible: boolean) => void;
onMenuClick?: (param: ClickParam) => void;
onNoticeClear?: (tabName: string) => void;
theme?: SiderTheme;
}
export default class GlobalHeaderRight extends React.Component<GlobalHeaderRightProps, any> {}
import React, { PureComponent } from 'react'; import React, { PureComponent } from 'react';
import { FormattedMessage, formatMessage } from 'umi/locale'; import { FormattedMessage, formatMessage } from 'umi-plugin-react/locale';
import { Spin, Tag, Menu, Icon, Avatar, Tooltip } from 'antd'; import { Spin, Tag, Menu, Icon, Avatar, Tooltip, message } from 'antd';
import moment from 'moment'; import moment from 'moment';
import groupBy from 'lodash/groupBy'; import groupBy from 'lodash/groupBy';
import NoticeIcon from '../NoticeIcon'; import NoticeIcon from '../NoticeIcon';
...@@ -63,30 +63,13 @@ export default class GlobalHeaderRight extends PureComponent { ...@@ -63,30 +63,13 @@ export default class GlobalHeaderRight extends PureComponent {
}); });
}; };
fetchMoreNotices = tabProps => {
const { list, name } = tabProps;
const { dispatch, notices = [] } = this.props;
const lastItemId = notices[notices.length - 1].id;
dispatch({
type: 'global/fetchMoreNotices',
payload: {
lastItemId,
type: name,
offset: list.length,
},
});
};
render() { render() {
const { const {
currentUser, currentUser,
fetchingMoreNotices,
fetchingNotices, fetchingNotices,
loadedAllNotices,
onNoticeVisibleChange, onNoticeVisibleChange,
onMenuClick, onMenuClick,
onNoticeClear, onNoticeClear,
skeletonCount,
theme, theme,
} = this.props; } = this.props;
const menu = ( const menu = (
...@@ -110,11 +93,6 @@ export default class GlobalHeaderRight extends PureComponent { ...@@ -110,11 +93,6 @@ export default class GlobalHeaderRight extends PureComponent {
</Menu.Item> </Menu.Item>
</Menu> </Menu>
); );
const loadMoreProps = {
skeletonCount,
loadedAll: loadedAllNotices,
loading: fetchingMoreNotices,
};
const noticeData = this.getNoticeData(); const noticeData = this.getNoticeData();
const unreadMsg = this.getUnreadData(noticeData); const unreadMsg = this.getUnreadData(noticeData);
let className = styles.right; let className = styles.right;
...@@ -155,44 +133,43 @@ export default class GlobalHeaderRight extends PureComponent { ...@@ -155,44 +133,43 @@ export default class GlobalHeaderRight extends PureComponent {
console.log(item, tabProps); // eslint-disable-line console.log(item, tabProps); // eslint-disable-line
this.changeReadState(item, tabProps); this.changeReadState(item, tabProps);
}} }}
loading={fetchingNotices}
locale={{ locale={{
emptyText: formatMessage({ id: 'component.noticeIcon.empty' }), emptyText: formatMessage({ id: 'component.noticeIcon.empty' }),
clear: formatMessage({ id: 'component.noticeIcon.clear' }), clear: formatMessage({ id: 'component.noticeIcon.clear' }),
loadedAll: formatMessage({ id: 'component.noticeIcon.loaded' }), viewMore: formatMessage({ id: 'component.noticeIcon.view-more' }),
loadMore: formatMessage({ id: 'component.noticeIcon.loading-more' }), notification: formatMessage({ id: 'component.globalHeader.notification' }),
message: formatMessage({ id: 'component.globalHeader.message' }),
event: formatMessage({ id: 'component.globalHeader.event' }),
}} }}
onClear={onNoticeClear} onClear={onNoticeClear}
onLoadMore={this.fetchMoreNotices}
onPopupVisibleChange={onNoticeVisibleChange} onPopupVisibleChange={onNoticeVisibleChange}
loading={fetchingNotices} onViewMore={() => message.info('Click on view more')}
clearClose clearClose
> >
<NoticeIcon.Tab <NoticeIcon.Tab
count={unreadMsg.notification} count={unreadMsg.notification}
list={noticeData.notification} list={noticeData.notification}
title={formatMessage({ id: 'component.globalHeader.notification' })} title="notification"
name="notification"
emptyText={formatMessage({ id: 'component.globalHeader.notification.empty' })} emptyText={formatMessage({ id: 'component.globalHeader.notification.empty' })}
emptyImage="https://gw.alipayobjects.com/zos/rmsportal/wAhyIChODzsoKIOBHcBk.svg" emptyImage="https://gw.alipayobjects.com/zos/rmsportal/wAhyIChODzsoKIOBHcBk.svg"
{...loadMoreProps} showViewMore
/> />
<NoticeIcon.Tab <NoticeIcon.Tab
count={unreadMsg.message} count={unreadMsg.message}
list={noticeData.message} list={noticeData.message}
title={formatMessage({ id: 'component.globalHeader.message' })} title="message"
name="message"
emptyText={formatMessage({ id: 'component.globalHeader.message.empty' })} emptyText={formatMessage({ id: 'component.globalHeader.message.empty' })}
emptyImage="https://gw.alipayobjects.com/zos/rmsportal/sAuJeJzSKbUmHfBQRzmZ.svg" emptyImage="https://gw.alipayobjects.com/zos/rmsportal/sAuJeJzSKbUmHfBQRzmZ.svg"
{...loadMoreProps} showViewMore
/> />
<NoticeIcon.Tab <NoticeIcon.Tab
count={unreadMsg.event} count={unreadMsg.event}
list={noticeData.event} list={noticeData.event}
title={formatMessage({ id: 'component.globalHeader.event' })} title="event"
name="event"
emptyText={formatMessage({ id: 'component.globalHeader.event.empty' })} emptyText={formatMessage({ id: 'component.globalHeader.event.empty' })}
emptyImage="https://gw.alipayobjects.com/zos/rmsportal/HsIsxMZiWKrNUavQUXqx.svg" emptyImage="https://gw.alipayobjects.com/zos/rmsportal/HsIsxMZiWKrNUavQUXqx.svg"
{...loadMoreProps} showViewMore
/> />
</NoticeIcon> </NoticeIcon>
{currentUser.name ? ( {currentUser.name ? (
......
import React from 'react';
export interface GlobalHeaderProps {
collapsed?: boolean;
onCollapse?: (collapsed: boolean) => void;
isMobile?: boolean;
logo?: string;
onNoticeClear?: (type: string) => void;
onMenuClick?: ({ key: string }) => void;
onNoticeVisibleChange?: (b: boolean) => void;
}
export default class GlobalHeader extends React.Component<GlobalHeaderProps, any> {}
import * as React from 'react'; import React from 'react';
export default class HeaderDropdown extends React.Component<any, any> {} import { DropDownProps } from 'antd/lib/dropdown';
declare type OverlayFunc = () => React.ReactNode;
export interface HeaderDropdownProps extends DropDownProps {
overlayClassName?: string;
overlay: React.ReactNode | OverlayFunc;
placement?: 'bottomLeft' | 'bottomRight' | 'topLeft' | 'topCenter' | 'topRight' | 'bottomCenter';
}
export default class HeaderDropdown extends React.Component<HeaderDropdownProps, any> {}
import * as React from 'react'; import React from 'react';
export interface IHeaderSearchProps { export interface HeaderSearchProps {
placeholder?: string; placeholder?: string;
dataSource?: string[]; dataSource?: string[];
defaultOpen?: boolean; defaultOpen?: boolean;
...@@ -12,4 +12,4 @@ export interface IHeaderSearchProps { ...@@ -12,4 +12,4 @@ export interface IHeaderSearchProps {
className?: string; className?: string;
} }
export default class HeaderSearch extends React.Component<IHeaderSearchProps, any> {} export default class HeaderSearch extends React.Component<HeaderSearchProps, any> {}
import * as React from 'react'; import React from 'react';
export interface ILoginItemProps { import { WrappedFormUtils } from 'antd/es/form/Form';
import ItemMap from './map';
import { Omit } from 'antd/es/_util/type';
export type WrappedLoginItemProps = Omit<LoginItemProps, 'form' | 'type' | 'updateActive'>;
export type LoginItemType = { [K in keyof typeof ItemMap]: React.FC<WrappedLoginItemProps> };
export interface LoginItemProps {
name?: string; name?: string;
rules?: any[]; rules?: any[];
style?: React.CSSProperties; style?: React.CSSProperties;
onGetCaptcha?: () => void; onGetCaptcha?: (event?: MouseEvent) => void;
placeholder?: string; placeholder?: string;
buttonText?: React.ReactNode; buttonText?: React.ReactNode;
onPressEnter?: (e: any) => void;
countDown?: number;
getCaptchaButtonText?: string;
getCaptchaSecondText?: string;
updateActive: (activeItem: any) => void;
form: WrappedFormUtils;
type: string;
defaultValue?: string;
customprops?: any;
onChange?: (e: any) => void;
} }
export default class LoginItem extends React.Component<ILoginItemProps, any> {} export default class LoginItem extends React.Component<LoginItemProps, any> {}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment