Skip to content

Commit

Permalink
update react 15
Browse files Browse the repository at this point in the history
  • Loading branch information
lpgray committed Oct 10, 2017
1 parent e198ceb commit 316e337
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 42 deletions.
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
demo/
build/
mock/
dist/
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@ spm_modules
dist
build
assets/**/*.css
.vscode
4 changes: 2 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ Thumbs.db
*.swp
out/
.build
.happypack
node_modules
_site
sea-modules
spm_modules
.cache
.happypack
dist
dist
15 changes: 12 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@ language: node_js

sudo: false

addons:
apt:
packages:
- xvfb

notification:
email:
- [email protected]

node_js:
- 4.0.0
- 6.9.0

before_install:
- |
Expand All @@ -17,6 +22,11 @@ before_install:
exit
fi
phantomjs --version
install:
- export DISPLAY=':99.0'
- Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- npm install


script:
- |
Expand All @@ -25,7 +35,6 @@ script:
else
npm run $TEST_TYPE
fi
env:
matrix:
- TEST_TYPE=test
Expand All @@ -34,4 +43,4 @@ env:

matrix:
allow_failures:
- env: "TEST_TYPE=saucelabs"
- env: "TEST_TYPE=saucelabs"
20 changes: 12 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@
"coverage": "uxcore-tools run coverage",
"pub": "uxcore-tools run pub",
"dep": "uxcore-tools run dep",
"update": "uxcore-tools run update",
"tnpm-dep": "uxcore-tools run tnpm-dep",
"saucelabs": "uxcore-tools run saucelabs",
"chrome": "uxcore-tools run chrome",
"browsers": "uxcore-tools run browsers"
"browsers": "uxcore-tools run browsers",
"saucelabs": "uxcore-tools run saucelabs",
"update": "uxcore-tools run update",
"tnpm-update": "uxcore-tools run tnpm-update"
},
"bugs": {
"url": "http://github.com/uxcore/uxcore-cascade-multi-select/issues"
Expand All @@ -32,24 +33,27 @@
],
"devDependencies": {
"console-polyfill": "^0.2.2",
"enzyme": "^3.0.0",
"enzyme-adapter-react-15": "^1.0.0",
"es5-shim": "^4.5.8",
"expect.js": "~0.3.1",
"kuma-base": "1.x",
"react": "0.14.x",
"react-addons-test-utils": "0.14.x",
"react-dom": "0.14.x",
"react": "15.x",
"react-dom": "15.x",
"react-test-renderer": "15.x",
"uxcore-cascade-select": "^0.3.3",
"uxcore-kuma": "*",
"uxcore-tools": "0.2.x"
},
"dependencies": {
"classnames": "^2.1.2",
"lodash": "^4.17.4",
"object-assign": "^4.0.0",
"prop-types": "15.x",
"uxcore-button": "^0.4.7",
"uxcore-dialog": "^0.7.0",
"object-assign": "^4.0.0",
"uxcore-dropdown": "^0.4.1"
},
"contributors": [],
"license": "MIT"
}
}
29 changes: 15 additions & 14 deletions src/CascadeMultiModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* All rights reserved.
*/
import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import deepcopy from 'lodash/cloneDeep';
import Button from 'uxcore-button';
Expand Down Expand Up @@ -279,21 +280,21 @@ CascadeMultiModal.defaultProps = {
};

CascadeMultiModal.propTypes = {
className: React.PropTypes.string,
prefixCls: React.PropTypes.string,
config: React.PropTypes.array,
options: React.PropTypes.array,
cascadeSize: React.PropTypes.number,
value: React.PropTypes.array,
notFoundContent: React.PropTypes.string,
allowClear: React.PropTypes.bool,
locale: React.PropTypes.string,
onSelect: React.PropTypes.func,
className: PropTypes.string,
prefixCls: PropTypes.string,
config: PropTypes.array,
options: PropTypes.array,
cascadeSize: PropTypes.number,
value: PropTypes.array,
notFoundContent: PropTypes.string,
allowClear: PropTypes.bool,
locale: PropTypes.string,
onSelect: PropTypes.func,

title: React.PropTypes.string,
width: React.PropTypes.number,
onOk: React.PropTypes.func,
onCancel: React.PropTypes.func,
title: PropTypes.string,
width: PropTypes.number,
onOk: PropTypes.func,
onCancel: PropTypes.func,
};

export default CascadeMultiModal;
27 changes: 14 additions & 13 deletions src/CascadeMultiPanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import React from 'react';
import classnames from 'classnames';
import deepcopy from 'lodash/cloneDeep';
import PropTypes from 'prop-types';
import i18n from './locale';

class CascadeMulti extends React.Component {
Expand Down Expand Up @@ -595,7 +596,7 @@ class CascadeMulti extends React.Component {
<i className="kuma-icon kuma-icon-triangle-right" />;
} else {
// 21 = kuma-icon的占位宽度
arr = <span style={{ width: 21, display: 'inline-block' }} />;
arr = <span style={{ width: '21px', display: 'inline-block' }} />;
}
return arr;
}
Expand Down Expand Up @@ -649,18 +650,18 @@ CascadeMulti.defaultProps = {
};

CascadeMulti.propTypes = {
className: React.PropTypes.string,
prefixCls: React.PropTypes.string,
config: React.PropTypes.array,
options: React.PropTypes.array,
cascadeSize: React.PropTypes.number,
value: React.PropTypes.array,
notFoundContent: React.PropTypes.string,
allowClear: React.PropTypes.bool,
locale: React.PropTypes.string,
onSelect: React.PropTypes.func,
onItemClick: React.PropTypes.func,
mode: React.PropTypes.oneOf(['independent', 'mix']),
className: PropTypes.string,
prefixCls: PropTypes.string,
config: PropTypes.array,
options: PropTypes.array,
cascadeSize: PropTypes.number,
value: PropTypes.array,
notFoundContent: PropTypes.string,
allowClear: PropTypes.bool,
locale: PropTypes.string,
onSelect: PropTypes.func,
onItemClick: PropTypes.func,
mode: PropTypes.oneOf(['independent', 'mix']),
};

CascadeMulti.displayName = 'CascadeMulti';
Expand Down
3 changes: 2 additions & 1 deletion src/CascadeMultiSelect.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
* Copyright 2015-2017, Uxcore Team, Alinw.
* All rights reserved.
*/
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import Dropdown from 'uxcore-dropdown';
import Button from 'uxcore-button';
Expand Down

0 comments on commit 316e337

Please sign in to comment.