uxcore-empty-data
Advanced tools
Comparing version 0.1.2 to 0.1.3
{ | ||
"extends": "airbnb", | ||
"parser": "babel-eslint", | ||
"plugins": [ | ||
"react" | ||
"react", | ||
"babel" | ||
], | ||
@@ -6,0 +8,0 @@ "env": { |
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
var _react = require('react'); | ||
var _react2 = _interopRequireDefault(_react); | ||
var _classnames2 = require('classnames'); | ||
var _classnames3 = _interopRequireDefault(_classnames2); | ||
var _propTypes = require('prop-types'); | ||
var _propTypes2 = _interopRequireDefault(_propTypes); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } | ||
@@ -11,13 +29,10 @@ | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); } /** | ||
* EmptyData Component for uxcore | ||
* @author eternalsky | ||
* | ||
* Copyright 2015-2016, Uxcore Team, Alinw. | ||
* All rights reserved. | ||
*/ | ||
/** | ||
* EmptyData Component for uxcore | ||
* @author eternalsky | ||
* | ||
* Copyright 2015-2016, Uxcore Team, Alinw. | ||
* All rights reserved. | ||
*/ | ||
var React = require('react'); | ||
var classnames = require('classnames'); | ||
@@ -35,3 +50,5 @@ var EmptyData = function (_React$Component) { | ||
} | ||
// http://facebook.github.io/react/docs/reusable-components.html | ||
EmptyData.prototype.render = function render() { | ||
@@ -54,9 +71,9 @@ var _classnames; | ||
}; | ||
return React.createElement( | ||
return _react2["default"].createElement( | ||
'div', | ||
{ | ||
className: classnames((_classnames = {}, _defineProperty(_classnames, prefixCls + ' ' + type, true), _defineProperty(_classnames, className, !!className), _classnames)), | ||
className: (0, _classnames3["default"])((_classnames = {}, _defineProperty(_classnames, prefixCls + ' ' + type, true), _defineProperty(_classnames, className, !!className), _classnames)), | ||
style: style | ||
}, | ||
React.createElement('div', { | ||
_react2["default"].createElement('div', { | ||
className: prefixCls + '-icon', | ||
@@ -67,3 +84,3 @@ style: { | ||
}), | ||
React.createElement( | ||
_react2["default"].createElement( | ||
'div', | ||
@@ -77,4 +94,11 @@ { className: prefixCls + '-content' }, | ||
return EmptyData; | ||
}(React.Component); | ||
}(_react2["default"].Component); | ||
EmptyData.propTypes = { | ||
prefixCls: _propTypes2["default"].string, | ||
icon: _propTypes2["default"].string, | ||
largeIcon: _propTypes2["default"].string, | ||
style: _propTypes2["default"].object, | ||
type: _propTypes2["default"].oneOf(['normal', 'large']) | ||
}; | ||
EmptyData.defaultProps = { | ||
@@ -87,14 +111,4 @@ prefixCls: 'kuma-empty-data', | ||
}; | ||
// http://facebook.github.io/react/docs/reusable-components.html | ||
EmptyData.propTypes = { | ||
prefixCls: React.PropTypes.string, | ||
icon: React.PropTypes.string, | ||
largeIcon: React.PropTypes.string, | ||
style: React.PropTypes.object, | ||
type: React.PropTypes.oneOf(['normal', 'large']) | ||
}; | ||
EmptyData.displayName = 'EmptyData'; | ||
module.exports = EmptyData; | ||
exports["default"] = EmptyData; | ||
module.exports = exports['default']; |
'use strict'; | ||
/** | ||
* EmptyData Component for uxcore | ||
* @author eternalsky | ||
* | ||
* Copyright 2015-2016, Uxcore Team, Alinw. | ||
* All rights reserved. | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
module.exports = require('./EmptyData'); | ||
var _EmptyData = require('./EmptyData'); | ||
var _EmptyData2 = _interopRequireDefault(_EmptyData); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
exports["default"] = _EmptyData2["default"]; /** | ||
* EmptyData Component for uxcore | ||
* @author eternalsky | ||
* | ||
* Copyright 2015-2016, Uxcore Team, Alinw. | ||
* All rights reserved. | ||
*/ | ||
module.exports = exports['default']; |
# history | ||
## 0.1.3 | ||
* `CHANGED` update react to ver 15.x | ||
* `CHANGED` eslint | ||
## 0.1.2 | ||
* `CHANGED` icon change |
{ | ||
"name": "uxcore-empty-data", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "uxcore-empty-data component for uxcore.", | ||
@@ -18,5 +18,7 @@ "repository": "https://github.com/uxcore/uxcore-empty-data.git", | ||
"tnpm-dep": "uxcore-tools run tnpm-dep", | ||
"chrome": "uxcore-tools run chrome", | ||
"browsers": "uxcore-tools run browsers", | ||
"saucelabs": "uxcore-tools run saucelabs", | ||
"chrome": "uxcore-tools run chrome", | ||
"browsers": "uxcore-tools run browsers" | ||
"update": "uxcore-tools run update", | ||
"tnpm-update": "uxcore-tools run tnpm-update" | ||
}, | ||
@@ -35,10 +37,13 @@ "bugs": { | ||
"console-polyfill": "^0.2.2", | ||
"enzyme": "^3.0.0", | ||
"enzyme-adapter-react-15": "^1.0.0", | ||
"es5-shim": "^4.5.8", | ||
"eslint-plugin-babel": "^4.1.2", | ||
"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-button": "^0.4.5", | ||
"uxcore-kuma": "2.x", | ||
"uxcore-kuma": "*", | ||
"uxcore-tools": "0.2.x" | ||
@@ -48,3 +53,4 @@ }, | ||
"classnames": "^2.1.2", | ||
"object-assign": "^4.0.0" | ||
"object-assign": "^4.0.0", | ||
"prop-types": "15.x" | ||
}, | ||
@@ -51,0 +57,0 @@ "contributors": [], |
@@ -8,7 +8,26 @@ /** | ||
*/ | ||
const React = require('react'); | ||
const classnames = require('classnames'); | ||
import React from 'react'; | ||
import classnames from 'classnames'; | ||
import PropTypes from 'prop-types'; | ||
class EmptyData extends React.Component { | ||
export default class EmptyData extends React.Component { | ||
// http://facebook.github.io/react/docs/reusable-components.html | ||
static propTypes = { | ||
prefixCls: PropTypes.string, | ||
icon: PropTypes.string, | ||
largeIcon: PropTypes.string, | ||
style: PropTypes.object, | ||
type: PropTypes.oneOf(['normal', 'large']), | ||
}; | ||
static defaultProps = { | ||
prefixCls: 'kuma-empty-data', | ||
children: '暂无数据', | ||
type: 'normal', | ||
icon: 'https://img.alicdn.com/tps/TB1SFFFOpXXXXXzXVXXXXXXXXXX-166-168.png', | ||
largeIcon: 'https://img.alicdn.com/tps/TB1oWW_OXXXXXXyapXXXXXXXXXX-390-390.png', | ||
}; | ||
static displayName = 'EmptyData'; | ||
constructor(props) { | ||
@@ -18,3 +37,2 @@ super(props); | ||
} | ||
render() { | ||
@@ -46,23 +64,1 @@ const me = this; | ||
} | ||
EmptyData.defaultProps = { | ||
prefixCls: 'kuma-empty-data', | ||
children: '暂无数据', | ||
type: 'normal', | ||
icon: 'https://img.alicdn.com/tps/TB1SFFFOpXXXXXzXVXXXXXXXXXX-166-168.png', | ||
largeIcon: 'https://img.alicdn.com/tps/TB1oWW_OXXXXXXyapXXXXXXXXXX-390-390.png', | ||
}; | ||
// http://facebook.github.io/react/docs/reusable-components.html | ||
EmptyData.propTypes = { | ||
prefixCls: React.PropTypes.string, | ||
icon: React.PropTypes.string, | ||
largeIcon: React.PropTypes.string, | ||
style: React.PropTypes.object, | ||
type: React.PropTypes.oneOf(['normal', 'large']), | ||
}; | ||
EmptyData.displayName = 'EmptyData'; | ||
module.exports = EmptyData; |
@@ -8,3 +8,4 @@ /** | ||
*/ | ||
import EmptyData from './EmptyData'; | ||
module.exports = require('./EmptyData'); | ||
export default EmptyData; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
18324
241
3
13
1
+ Addedprop-types@15.x
+ Addedjs-tokens@4.0.0(transitive)
+ Addedloose-envify@1.4.0(transitive)
+ Addedprop-types@15.8.1(transitive)
+ Addedreact-is@16.13.1(transitive)