rc-progress
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -13,27 +13,35 @@ 'use strict'; | ||
var _mixin = require('./mixin'); | ||
var _propTypes = require('prop-types'); | ||
var _mixin2 = _interopRequireDefault(_mixin); | ||
var _propTypes2 = _interopRequireDefault(_propTypes); | ||
var _enhancer = require('./enhancer'); | ||
var _enhancer2 = _interopRequireDefault(_enhancer); | ||
var _types = require('./types'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } /* eslint-disable react/prop-types */ | ||
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; } | ||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | ||
exports["default"] = _react2["default"].createClass({ | ||
displayName: 'Circle', | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
propTypes: { | ||
percent: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]), | ||
strokeWidth: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]), | ||
trailWidth: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]), | ||
className: _react.PropTypes.string, | ||
style: _react.PropTypes.object, | ||
trailColor: _react.PropTypes.string, | ||
strokeColor: _react.PropTypes.string, | ||
gapPosition: _react.PropTypes.oneOf(['top', 'bottom', 'left', 'right']), | ||
strokeLinecap: _react.PropTypes.string | ||
}, | ||
mixins: [_mixin2["default"]], | ||
getPathStyles: function getPathStyles() { | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
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); } /* eslint react/prop-types: 0 */ | ||
var Circle = function (_Component) { | ||
_inherits(Circle, _Component); | ||
function Circle() { | ||
_classCallCheck(this, Circle); | ||
return _possibleConstructorReturn(this, _Component.apply(this, arguments)); | ||
} | ||
Circle.prototype.getPathStyles = function getPathStyles() { | ||
var _props = this.props; | ||
@@ -83,6 +91,7 @@ var percent = _props.percent; | ||
return { pathString: pathString, trailPathStyle: trailPathStyle, strokePathStyle: strokePathStyle }; | ||
}, | ||
render: function render() { | ||
var _this = this; | ||
}; | ||
Circle.prototype.render = function render() { | ||
var _this2 = this; | ||
var _props2 = this.props; | ||
@@ -132,3 +141,3 @@ var prefixCls = _props2.prefixCls; | ||
ref: function ref(path) { | ||
_this.path = path; | ||
_this2.path = path; | ||
}, | ||
@@ -138,4 +147,16 @@ style: strokePathStyle | ||
); | ||
} | ||
}; | ||
return Circle; | ||
}(_react.Component); | ||
Circle.propTypes = _extends({}, _types.propTypes, { | ||
gapPosition: _propTypes2["default"].oneOf(['top', 'bottom', 'left', 'right']) | ||
}); | ||
Circle.defaultProps = _extends({}, _types.defaultProps, { | ||
gapPosition: 'top' | ||
}); | ||
exports["default"] = (0, _enhancer2["default"])(Circle); | ||
module.exports = exports['default']; |
@@ -13,31 +13,47 @@ 'use strict'; | ||
var _mixin = require('./mixin'); | ||
var _enhancer = require('./enhancer'); | ||
var _mixin2 = _interopRequireDefault(_mixin); | ||
var _enhancer2 = _interopRequireDefault(_enhancer); | ||
var _types = require('./types'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } /* eslint-disable react/prop-types */ | ||
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; } | ||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | ||
exports["default"] = _react2["default"].createClass({ | ||
displayName: 'Line', | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
mixins: [_mixin2["default"]], | ||
render: function render() { | ||
var _this = this; | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
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); } | ||
var Line = function (_Component) { | ||
_inherits(Line, _Component); | ||
function Line() { | ||
_classCallCheck(this, Line); | ||
return _possibleConstructorReturn(this, _Component.apply(this, arguments)); | ||
} | ||
Line.prototype.render = function render() { | ||
var _this2 = this; | ||
var _props = this.props; | ||
var className = _props.className; | ||
var percent = _props.percent; | ||
var prefixCls = _props.prefixCls; | ||
var strokeWidth = _props.strokeWidth; | ||
var trailWidth = _props.trailWidth; | ||
var strokeColor = _props.strokeColor; | ||
var trailColor = _props.trailColor; | ||
var strokeLinecap = _props.strokeLinecap; | ||
var percent = _props.percent; | ||
var strokeWidth = _props.strokeWidth; | ||
var style = _props.style; | ||
var className = _props.className; | ||
var trailColor = _props.trailColor; | ||
var trailWidth = _props.trailWidth; | ||
var restProps = _objectWithoutProperties(_props, ['prefixCls', 'strokeWidth', 'trailWidth', 'strokeColor', 'trailColor', 'strokeLinecap', 'percent', 'style', 'className']); | ||
var restProps = _objectWithoutProperties(_props, ['className', 'percent', 'prefixCls', 'strokeColor', 'strokeLinecap', 'strokeWidth', 'style', 'trailColor', 'trailWidth']); | ||
delete restProps.gapPosition; | ||
var pathStyle = { | ||
@@ -51,3 +67,3 @@ strokeDasharray: '100px, 100px', | ||
var right = 100 - strokeWidth / 2; | ||
var pathString = 'M ' + center + ',' + center + ' L ' + right + ',' + center; | ||
var pathString = 'M ' + (strokeLinecap === 'round' ? center : 0) + ',' + center + '\n L ' + (strokeLinecap === 'round' ? right : 100) + ',' + center; | ||
var viewBoxString = '0 0 100 ' + strokeWidth; | ||
@@ -79,3 +95,3 @@ | ||
ref: function ref(path) { | ||
_this.path = path; | ||
_this2.path = path; | ||
}, | ||
@@ -85,4 +101,12 @@ style: pathStyle | ||
); | ||
} | ||
}); | ||
}; | ||
return Line; | ||
}(_react.Component); | ||
Line.propTypes = _types.propTypes; | ||
Line.defaultProps = _types.defaultProps; | ||
exports["default"] = (0, _enhancer2["default"])(Line); | ||
module.exports = exports['default']; |
{ | ||
"name": "rc-progress", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "progress ui component for react", | ||
@@ -46,8 +46,11 @@ "keywords": [ | ||
"rc-tools": "5.x", | ||
"react": "^15.3.0", | ||
"react-dom": "^15.3.0" | ||
"react": "^15.5.4", | ||
"react-dom": "^15.5.4" | ||
}, | ||
"pre-commit": [ | ||
"lint" | ||
] | ||
], | ||
"dependencies": { | ||
"prop-types": "^15.5.8" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21166
11
284
1
+ Addedprop-types@^15.5.8
+ Addedjs-tokens@4.0.0(transitive)
+ Addedloose-envify@1.4.0(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedprop-types@15.8.1(transitive)
+ Addedreact-is@16.13.1(transitive)