Skip to content

Commit

Permalink
feat: switch antd result (ant-design#33)
Browse files Browse the repository at this point in the history
* use Result

* remove result

* remove all umi

* add new snapshot
  • Loading branch information
chenshuai2144 authored Jul 2, 2019
1 parent d2b2353 commit 97dc65d
Show file tree
Hide file tree
Showing 135 changed files with 396 additions and 1,651 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
const fabric = require('@umijs/fabric');

const path = require('path');
module.exports = {
...fabric.default,
rules: {
...fabric.default.rules,
'@typescript-eslint/camelcase': 0,
'@typescript-eslint/class-name-casing': 0,
'import/no-extraneous-dependencies': 0,
},
globals: {
ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: true,
Expand Down
23 changes: 9 additions & 14 deletions AccountCenter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,28 @@
"name": "@umi-block/account-center",
"version": "0.0.1",
"description": "AccountCenter",
"main": "src/index.js",
"scripts": {
"dev": "umi dev"
},
"repository": {
"type": "git",
"url": "https://github.com/umijs/umi-blocks/ant-design-pro/accountcenter"
},
"license": "ISC",
"main": "src/index.js",
"scripts": {
"dev": "umi dev"
},
"dependencies": {
"@ant-design/pro-layout": "^4.5.5",
"antd": "^3.16.3",
"classnames": "^2.2.6",
"dva": "^2.4.0",
"moment": "^2.24.0",
"numeral": "^2.0.6",
"react": "^16.6.3",
"react-router": "^4.3.1",
"redux": "^4.0.1",
"umi-request": "^1.0.0",
"umi": "^2.6.9"
"umi-request": "^1.0.0"
},
"devDependencies": {
"umi-plugin-block-dev": "^1.0.0",
"umi-plugin-react": "^1.8.4"
"peerDependencies": {
"@ant-design/pro-layout": "^4.5.5"
},
"license": "ISC",
"blockConfig": {
"specVersion": "0.1"
}
}
}
Binary file modified AccountCenter/snapshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion AccountCenter/src/components/Applications/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class Applications extends Component<Partial<ModalState>> {
</Menu.Item>
</Menu>
);
const CardInfo: React.SFC<{
const CardInfo: React.FC<{
activeUser: React.ReactNode;
newUser: React.ReactNode;
}> = ({ activeUser, newUser }) => (
Expand Down
2 changes: 1 addition & 1 deletion AccountCenter/src/components/ArticleListContent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export interface ApplicationsProps {
href?: string;
};
}
const ArticleListContent: React.SFC<ApplicationsProps> = ({
const ArticleListContent: React.FC<ApplicationsProps> = ({
data: { content, updatedAt, avatar, owner, href },
}) => (
<div className={styles.listContent}>
Expand Down
2 changes: 1 addition & 1 deletion AccountCenter/src/components/Articles/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import styles from './index.less';
class Articles extends Component<Partial<ModalState>> {
render() {
const { list } = this.props;
const IconText: React.SFC<{
const IconText: React.FC<{
type: string;
text: React.ReactNode;
}> = ({ type, text }) => (
Expand Down
4 changes: 2 additions & 2 deletions AccountCenter/src/components/AvatarList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const avatarSizeToClassName = (size?: SizeType | 'mini') =>
[styles.avatarItemMini]: size === 'mini',
});

const Item: React.SFC<AvatarItemProps> = ({ src, size, tips, onClick = () => {} }) => {
const Item: React.FC<AvatarItemProps> = ({ src, size, tips, onClick = () => {} }) => {
const cls = avatarSizeToClassName(size);

return (
Expand All @@ -46,7 +46,7 @@ const Item: React.SFC<AvatarItemProps> = ({ src, size, tips, onClick = () => {}
);
};

const AvatarList: React.SFC<AvatarListProps> & { Item: typeof Item } = ({
const AvatarList: React.FC<AvatarListProps> & { Item: typeof Item } = ({
children,
size,
maxLength = 5,
Expand Down
14 changes: 4 additions & 10 deletions AccountSettings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,14 @@
"dev": "umi dev"
},
"dependencies": {
"@ant-design/pro-layout": "^4.5.5",
"antd": "^3.16.3",
"dva": "^2.4.0",
"react": "^16.6.3",
"redux": "^4.0.1",
"umi-request": "^1.0.0",
"umi-plugin-react": "^1.8.4",
"umi": "^2.6.9"

"umi-request": "^1.0.0"
},
"devDependencies": {
"umi-plugin-block-dev": "^1.0.0"
"peerDependencies": {
"@ant-design/pro-layout": "^4.5.5"
},
"blockConfig": {
"specVersion": "0.1"
}
}
}
Binary file modified AccountSettings/snapshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 7 additions & 10 deletions DashboardAnalysis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,26 @@
"dev": "umi dev"
},
"dependencies": {
"@ant-design/pro-layout": "^4.5.5",
"@antv/data-set": "^0.10.2",
"antd": "^3.16.3",
"@types/lodash.debounce": "^4.0.6",
"bizcharts": "^3.5.3-beta.0",
"bizcharts-plugin-slider": "^2.1.1-beta.1",
"classnames": "^2.2.6",
"dva": "^2.4.0",
"@types/lodash.debounce": "^4.0.6",
"dva": "^2.4.0",
"lodash.debounce": "^4.0.8",
"moment": "^2.22.2",
"numeral": "^2.0.6",
"react": "^16.6.3",
"react-fittext": "^1.0.0",
"redux": "^4.0.1",
"umi-plugin-react": "^1.8.4",
"umi-request": "^1.0.0"
},
"devDependencies": {
"@types/numeral": "^0.0.25",
"umi": "^2.6.9",
"umi-plugin-block-dev": "^1.1.0"
"@types/numeral": "^0.0.25"
},
"peerDependencies": {
"@ant-design/pro-layout": "^4.5.5"
},
"blockConfig": {
"specVersion": "0.1"
}
}
}
Binary file modified DashboardAnalysis/snapshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion DashboardAnalysis/src/components/Charts/Field/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export interface FieldProps {
style?: React.CSSProperties;
}

const Field: React.SFC<FieldProps> = ({ label, value, ...rest }) => (
const Field: React.FC<FieldProps> = ({ label, value, ...rest }) => (
<div className={styles.field} {...rest}>
<span className={styles.label}>{label}</span>
<span className={styles.number}>{value}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export interface MiniProgressProps {
style?: React.CSSProperties;
}

const MiniProgress: React.SFC<MiniProgressProps> = ({
const MiniProgress: React.FC<MiniProgressProps> = ({
targetLabel,
target,
color = 'rgb(19, 194, 194)',
Expand Down
2 changes: 1 addition & 1 deletion DashboardAnalysis/src/components/Charts/autoHeight.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ interface AutoHeightProps {

function autoHeight() {
return <P extends AutoHeightProps>(
WrappedComponent: React.ComponentClass<P> | React.SFC<P>,
WrappedComponent: React.ComponentClass<P> | React.FC<P>,
): React.ComponentClass<P> => {
class AutoHeightComponent extends React.Component<P & AutoHeightProps> {
state = {
Expand Down
2 changes: 1 addition & 1 deletion DashboardAnalysis/src/components/NumberInfo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export interface NumberInfoProps {
suffix?: string;
style?: React.CSSProperties;
}
const NumberInfo: React.SFC<NumberInfoProps> = ({
const NumberInfo: React.FC<NumberInfoProps> = ({
theme,
title,
subTitle,
Expand Down
2 changes: 1 addition & 1 deletion DashboardAnalysis/src/components/Trend/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export interface TrendProps {
className?: string;
}

const Trend: React.SFC<TrendProps> = ({
const Trend: React.FC<TrendProps> = ({
colorful = true,
reverseColor = false,
flag,
Expand Down
25 changes: 11 additions & 14 deletions DashboardMonitor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,36 @@
"name": "@umi-block/monitor",
"version": "0.0.1",
"description": "Monitor",
"main": "src/index.js",
"scripts": {
"dev": "umi dev"
},
"repository": {
"type": "git",
"url": "https://github.com/umijs/umi-blocks/ant-design-pro/monitor"
},
"license": "ISC",
"main": "src/index.js",
"scripts": {
"dev": "umi dev"
},
"dependencies": {
"@ant-design/pro-layout": "^4.5.2",
"@antv/data-set": "^0.10.2",
"@types/lodash.debounce": "^4.0.6",
"antd": "^3.16.3",
"bizcharts": "^3.5.3-beta.0",
"bizcharts-plugin-slider": "^2.1.1-beta.1",
"classnames": "^2.2.6",
"dva": "^2.4.0",
"lodash.debounce": "^4.0.8",
"mockjs": "^1.0.1-beta3",
"numeral": "^2.0.6",
"react": "^16.8.6",
"react-fittext": "^1.0.0",
"redux": "^4.0.1",
"umi": "^2.6.9",
"umi-plugin-block-dev": "^1.0.0",
"umi-plugin-react": "^1.8.4",
"umi-request": "^1.0.0",
"mockjs": "^1.0.1-beta3"
"umi-request": "^1.0.0"
},
"devDependencies": {
"@types/numeral": "^0.0.25"
},
"license": "ISC",
"peerDependencies": {
"@ant-design/pro-layout": "^4.5.5"
},
"blockConfig": {
"specVersion": "0.1"
}
}
}
Binary file modified DashboardMonitor/snapshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion DashboardMonitor/src/components/Charts/autoHeight.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ interface AutoHeightProps {

function autoHeight() {
return <P extends AutoHeightProps>(
WrappedComponent: React.ComponentClass<P> | React.SFC<P>,
WrappedComponent: React.ComponentClass<P> | React.FC<P>,
): React.ComponentClass<P> => {
class AutoHeightComponent extends React.Component<P & AutoHeightProps> {
state = {
Expand Down
20 changes: 8 additions & 12 deletions DashboardWorkplace/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,27 @@
"name": "@umi-block/workplace",
"version": "0.0.1",
"description": "Workplace",
"main": "src/index.js",
"scripts": {
"dev": "umi dev"
},
"repository": {
"type": "git",
"url": "https://github.com/umijs/umi-blocks/ant-design-pro/workplace"
},
"license": "MIT",
"main": "src/index.js",
"scripts": {
"dev": "umi dev"
},
"dependencies": {
"@ant-design/pro-layout": "^4.5.5",
"antd": "^3.16.3",
"bizcharts": "^3.5.3-beta.0",
"dva": "^2.4.0",
"moment": "^2.22.2",
"prop-types": "^15.5.10",
"react": "^16.6.3",
"redux": "^4.0.1",
"umi": "^2.6.9",
"umi-request": "^1.0.0"
},
"devDependencies": {
"umi-plugin-block-dev": "^1.0.0"
"peerDependencies": {
"@ant-design/pro-layout": "^4.5.5"
},
"license": "MIT",
"blockConfig": {
"specVersion": "0.1"
}
}
}
Binary file modified DashboardWorkplace/snapshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion DashboardWorkplace/src/components/Radar/autoHeight.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ interface AutoHeightProps {

function autoHeight() {
return <P extends AutoHeightProps>(
WrappedComponent: React.ComponentClass<P> | React.SFC<P>,
WrappedComponent: React.ComponentClass<P> | React.FC<P>,
): React.ComponentClass<P> => {
class AutoHeightComponent extends React.Component<P & AutoHeightProps> {
state = {
Expand Down
12 changes: 5 additions & 7 deletions EditorFlow/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,24 @@
"dev": "umi dev"
},
"dependencies": {
"@ant-design/pro-layout": "^4.5.5",
"@antv/data-set": "^0.10.2",
"antd": "^3.16.3",
"bizcharts": "^3.5.3-beta.0",
"bizcharts-plugin-slider": "^2.1.1-beta.1",
"dva": "^2.4.0",
"gg-editor": "^2.0.2",
"moment": "^2.22.2",
"numeral": "^2.0.6",
"react": "^16.6.3",
"react-fittext": "^1.0.0",
"umi": "^2.6.9",
"umi-plugin-react": "^1.8.4",
"umi-request": "^1.0.0"
},
"peerDependencies": {
"@ant-design/pro-layout": "^4.5.5"
},
"devDependencies": {
"@types/numeral": "^0.0.25",
"umi-plugin-block-dev": "^1.1.0"
"@types/numeral": "^0.0.25"
},
"blockConfig": {
"specVersion": "0.1"
}
}
}
Binary file modified EditorFlow/snapshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion EditorFlow/src/components/EditorContextMenu/MenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface MenuItemProps {
icon?: string;
text?: string;
}
const MenuItem: React.SFC<MenuItemProps> = props => {
const MenuItem: React.FC<MenuItemProps> = props => {
const { command, icon, text } = props;

return (
Expand Down
2 changes: 1 addition & 1 deletion EditorFlow/src/components/EditorToolbar/ToolbarButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface ToolbarButtonProps {
icon?: string;
text?: string;
}
const ToolbarButton: React.SFC<ToolbarButtonProps> = props => {
const ToolbarButton: React.FC<ToolbarButtonProps> = props => {
const { command, icon, text } = props;

return (
Expand Down
Loading

0 comments on commit 97dc65d

Please sign in to comment.