rc-progress
Advanced tools
Comparing version 2.5.2 to 2.5.3
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
@@ -17,11 +17,15 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | ||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
@@ -92,7 +96,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
var Circle = | ||
/*#__PURE__*/ | ||
function (_Component) { | ||
var Circle = /*#__PURE__*/function (_Component) { | ||
_inherits(Circle, _Component); | ||
var _super = _createSuper(Circle); | ||
function Circle() { | ||
@@ -103,3 +107,3 @@ var _this; | ||
_this = _possibleConstructorReturn(this, _getPrototypeOf(Circle).call(this)); | ||
_this = _super.call(this); | ||
@@ -140,3 +144,3 @@ _defineProperty(_assertThisInitialized(_this), "paths", {}); | ||
stackPtg += ptg; | ||
return React.createElement("path", { | ||
return /*#__PURE__*/React.createElement("path", { | ||
key: index, | ||
@@ -147,3 +151,4 @@ className: "".concat(prefixCls, "-circle-path"), | ||
strokeLinecap: strokeLinecap, | ||
strokeWidth: ptg === 0 ? 0 : strokeWidth, | ||
strokeWidth: strokeWidth, | ||
opacity: ptg === 0 ? 0 : 1, | ||
fillOpacity: "0", | ||
@@ -182,7 +187,7 @@ style: pathStyle, | ||
}); | ||
return React.createElement("svg", _extends({ | ||
return /*#__PURE__*/React.createElement("svg", _extends({ | ||
className: "".concat(prefixCls, "-circle ").concat(className), | ||
viewBox: "0 0 100 100", | ||
style: style | ||
}, restProps), gradient && React.createElement("defs", null, React.createElement("linearGradient", { | ||
}, restProps), gradient && /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", { | ||
id: "".concat(prefixCls, "-gradient-").concat(this.gradientId), | ||
@@ -196,3 +201,3 @@ x1: "100%", | ||
}).map(function (key, index) { | ||
return React.createElement("stop", { | ||
return /*#__PURE__*/React.createElement("stop", { | ||
key: index, | ||
@@ -202,3 +207,3 @@ offset: key, | ||
}); | ||
}))), React.createElement("path", { | ||
}))), /*#__PURE__*/React.createElement("path", { | ||
className: "".concat(prefixCls, "-circle-trail"), | ||
@@ -218,8 +223,8 @@ d: pathString, | ||
Circle.propTypes = _objectSpread({}, propTypes, { | ||
Circle.propTypes = _objectSpread(_objectSpread({}, propTypes), {}, { | ||
gapPosition: PropTypes.oneOf(['top', 'bottom', 'left', 'right']) | ||
}); | ||
Circle.defaultProps = _objectSpread({}, defaultProps, { | ||
Circle.defaultProps = _objectSpread(_objectSpread({}, defaultProps), {}, { | ||
gapPosition: 'top' | ||
}); | ||
export default enhancer(Circle); |
@@ -7,6 +7,2 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); } | ||
@@ -16,4 +12,2 @@ | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
@@ -23,53 +17,62 @@ | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | ||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
var enhancer = function enhancer(WrappedComponent) { | ||
return ( | ||
/*#__PURE__*/ | ||
function (_WrappedComponent) { | ||
_inherits(Progress, _WrappedComponent); | ||
return /*#__PURE__*/function (_WrappedComponent) { | ||
_inherits(Progress, _WrappedComponent); | ||
function Progress() { | ||
_classCallCheck(this, Progress); | ||
var _super = _createSuper(Progress); | ||
return _possibleConstructorReturn(this, _getPrototypeOf(Progress).apply(this, arguments)); | ||
} | ||
function Progress() { | ||
_classCallCheck(this, Progress); | ||
_createClass(Progress, [{ | ||
key: "componentDidUpdate", | ||
value: function componentDidUpdate() { | ||
var _this = this; | ||
return _super.apply(this, arguments); | ||
} | ||
var now = Date.now(); | ||
var updated = false; | ||
Object.keys(this.paths).forEach(function (key) { | ||
var path = _this.paths[key]; | ||
_createClass(Progress, [{ | ||
key: "componentDidUpdate", | ||
value: function componentDidUpdate() { | ||
var _this = this; | ||
if (!path) { | ||
return; | ||
} | ||
var now = Date.now(); | ||
var updated = false; | ||
Object.keys(this.paths).forEach(function (key) { | ||
var path = _this.paths[key]; | ||
updated = true; | ||
var pathStyle = path.style; | ||
pathStyle.transitionDuration = '.3s, .3s, .3s, .06s'; | ||
if (!path) { | ||
return; | ||
} | ||
if (_this.prevTimeStamp && now - _this.prevTimeStamp < 100) { | ||
pathStyle.transitionDuration = '0s, 0s'; | ||
} | ||
}); | ||
updated = true; | ||
var pathStyle = path.style; | ||
pathStyle.transitionDuration = '.3s, .3s, .3s, .06s'; | ||
if (updated) { | ||
this.prevTimeStamp = Date.now(); | ||
if (_this.prevTimeStamp && now - _this.prevTimeStamp < 100) { | ||
pathStyle.transitionDuration = '0s, 0s'; | ||
} | ||
}); | ||
if (updated) { | ||
this.prevTimeStamp = Date.now(); | ||
} | ||
}, { | ||
key: "render", | ||
value: function render() { | ||
return _get(_getPrototypeOf(Progress.prototype), "render", this).call(this); | ||
} | ||
}]); | ||
} | ||
}, { | ||
key: "render", | ||
value: function render() { | ||
return _get(_getPrototypeOf(Progress.prototype), "render", this).call(this); | ||
} | ||
}]); | ||
return Progress; | ||
}(WrappedComponent) | ||
); | ||
return Progress; | ||
}(WrappedComponent); | ||
}; | ||
export default enhancer; |
@@ -13,11 +13,15 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | ||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
@@ -30,10 +34,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
var Line = | ||
/*#__PURE__*/ | ||
function (_Component) { | ||
var Line = /*#__PURE__*/function (_Component) { | ||
_inherits(Line, _Component); | ||
var _super = _createSuper(Line); | ||
function Line() { | ||
var _getPrototypeOf2; | ||
var _this; | ||
@@ -47,3 +49,3 @@ | ||
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Line)).call.apply(_getPrototypeOf2, [this].concat(args))); | ||
_this = _super.call.apply(_super, [this].concat(args)); | ||
@@ -81,3 +83,3 @@ _defineProperty(_assertThisInitialized(_this), "paths", {}); | ||
var stackPtg = 0; | ||
return React.createElement("svg", _extends({ | ||
return /*#__PURE__*/React.createElement("svg", _extends({ | ||
className: "".concat(prefixCls, "-line ").concat(className), | ||
@@ -87,3 +89,3 @@ viewBox: viewBoxString, | ||
style: style | ||
}, restProps), React.createElement("path", { | ||
}, restProps), /*#__PURE__*/React.createElement("path", { | ||
className: "".concat(prefixCls, "-line-trail"), | ||
@@ -103,3 +105,3 @@ d: pathString, | ||
stackPtg += ptg; | ||
return React.createElement("path", { | ||
return /*#__PURE__*/React.createElement("path", { | ||
key: index, | ||
@@ -106,0 +108,0 @@ className: "".concat(prefixCls, "-line-path"), |
@@ -18,7 +18,9 @@ "use strict"; | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
@@ -37,11 +39,15 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | ||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
@@ -107,7 +113,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
var Circle = | ||
/*#__PURE__*/ | ||
function (_Component) { | ||
var Circle = /*#__PURE__*/function (_Component) { | ||
_inherits(Circle, _Component); | ||
var _super = _createSuper(Circle); | ||
function Circle() { | ||
@@ -118,3 +124,3 @@ var _this; | ||
_this = _possibleConstructorReturn(this, _getPrototypeOf(Circle).call(this)); | ||
_this = _super.call(this); | ||
@@ -155,3 +161,3 @@ _defineProperty(_assertThisInitialized(_this), "paths", {}); | ||
stackPtg += ptg; | ||
return _react["default"].createElement("path", { | ||
return /*#__PURE__*/_react["default"].createElement("path", { | ||
key: index, | ||
@@ -162,3 +168,4 @@ className: "".concat(prefixCls, "-circle-path"), | ||
strokeLinecap: strokeLinecap, | ||
strokeWidth: ptg === 0 ? 0 : strokeWidth, | ||
strokeWidth: strokeWidth, | ||
opacity: ptg === 0 ? 0 : 1, | ||
fillOpacity: "0", | ||
@@ -197,7 +204,7 @@ style: pathStyle, | ||
}); | ||
return _react["default"].createElement("svg", _extends({ | ||
return /*#__PURE__*/_react["default"].createElement("svg", _extends({ | ||
className: "".concat(prefixCls, "-circle ").concat(className), | ||
viewBox: "0 0 100 100", | ||
style: style | ||
}, restProps), gradient && _react["default"].createElement("defs", null, _react["default"].createElement("linearGradient", { | ||
}, restProps), gradient && /*#__PURE__*/_react["default"].createElement("defs", null, /*#__PURE__*/_react["default"].createElement("linearGradient", { | ||
id: "".concat(prefixCls, "-gradient-").concat(this.gradientId), | ||
@@ -211,3 +218,3 @@ x1: "100%", | ||
}).map(function (key, index) { | ||
return _react["default"].createElement("stop", { | ||
return /*#__PURE__*/_react["default"].createElement("stop", { | ||
key: index, | ||
@@ -217,3 +224,3 @@ offset: key, | ||
}); | ||
}))), _react["default"].createElement("path", { | ||
}))), /*#__PURE__*/_react["default"].createElement("path", { | ||
className: "".concat(prefixCls, "-circle-trail"), | ||
@@ -233,6 +240,6 @@ d: pathString, | ||
Circle.propTypes = _objectSpread({}, _types.propTypes, { | ||
Circle.propTypes = _objectSpread(_objectSpread({}, _types.propTypes), {}, { | ||
gapPosition: _propTypes["default"].oneOf(['top', 'bottom', 'left', 'right']) | ||
}); | ||
Circle.defaultProps = _objectSpread({}, _types.defaultProps, { | ||
Circle.defaultProps = _objectSpread(_objectSpread({}, _types.defaultProps), {}, { | ||
gapPosition: 'top' | ||
@@ -239,0 +246,0 @@ }); |
@@ -14,6 +14,2 @@ "use strict"; | ||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); } | ||
@@ -23,4 +19,2 @@ | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
@@ -30,51 +24,60 @@ | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | ||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
var enhancer = function enhancer(WrappedComponent) { | ||
return ( | ||
/*#__PURE__*/ | ||
function (_WrappedComponent) { | ||
_inherits(Progress, _WrappedComponent); | ||
return /*#__PURE__*/function (_WrappedComponent) { | ||
_inherits(Progress, _WrappedComponent); | ||
function Progress() { | ||
_classCallCheck(this, Progress); | ||
var _super = _createSuper(Progress); | ||
return _possibleConstructorReturn(this, _getPrototypeOf(Progress).apply(this, arguments)); | ||
} | ||
function Progress() { | ||
_classCallCheck(this, Progress); | ||
_createClass(Progress, [{ | ||
key: "componentDidUpdate", | ||
value: function componentDidUpdate() { | ||
var _this = this; | ||
return _super.apply(this, arguments); | ||
} | ||
var now = Date.now(); | ||
var updated = false; | ||
Object.keys(this.paths).forEach(function (key) { | ||
var path = _this.paths[key]; | ||
_createClass(Progress, [{ | ||
key: "componentDidUpdate", | ||
value: function componentDidUpdate() { | ||
var _this = this; | ||
if (!path) { | ||
return; | ||
} | ||
var now = Date.now(); | ||
var updated = false; | ||
Object.keys(this.paths).forEach(function (key) { | ||
var path = _this.paths[key]; | ||
updated = true; | ||
var pathStyle = path.style; | ||
pathStyle.transitionDuration = '.3s, .3s, .3s, .06s'; | ||
if (!path) { | ||
return; | ||
} | ||
if (_this.prevTimeStamp && now - _this.prevTimeStamp < 100) { | ||
pathStyle.transitionDuration = '0s, 0s'; | ||
} | ||
}); | ||
updated = true; | ||
var pathStyle = path.style; | ||
pathStyle.transitionDuration = '.3s, .3s, .3s, .06s'; | ||
if (updated) { | ||
this.prevTimeStamp = Date.now(); | ||
if (_this.prevTimeStamp && now - _this.prevTimeStamp < 100) { | ||
pathStyle.transitionDuration = '0s, 0s'; | ||
} | ||
}); | ||
if (updated) { | ||
this.prevTimeStamp = Date.now(); | ||
} | ||
}, { | ||
key: "render", | ||
value: function render() { | ||
return _get(_getPrototypeOf(Progress.prototype), "render", this).call(this); | ||
} | ||
}]); | ||
} | ||
}, { | ||
key: "render", | ||
value: function render() { | ||
return _get(_getPrototypeOf(Progress.prototype), "render", this).call(this); | ||
} | ||
}]); | ||
return Progress; | ||
}(WrappedComponent) | ||
); | ||
return Progress; | ||
}(WrappedComponent); | ||
}; | ||
@@ -81,0 +84,0 @@ |
@@ -16,4 +16,6 @@ "use strict"; | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj["default"] = obj; return newObj; } } | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
@@ -31,22 +33,24 @@ | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | ||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
var Line = | ||
/*#__PURE__*/ | ||
function (_Component) { | ||
var Line = /*#__PURE__*/function (_Component) { | ||
_inherits(Line, _Component); | ||
var _super = _createSuper(Line); | ||
function Line() { | ||
var _getPrototypeOf2; | ||
var _this; | ||
@@ -60,3 +64,3 @@ | ||
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Line)).call.apply(_getPrototypeOf2, [this].concat(args))); | ||
_this = _super.call.apply(_super, [this].concat(args)); | ||
@@ -94,3 +98,3 @@ _defineProperty(_assertThisInitialized(_this), "paths", {}); | ||
var stackPtg = 0; | ||
return _react["default"].createElement("svg", _extends({ | ||
return /*#__PURE__*/_react["default"].createElement("svg", _extends({ | ||
className: "".concat(prefixCls, "-line ").concat(className), | ||
@@ -100,3 +104,3 @@ viewBox: viewBoxString, | ||
style: style | ||
}, restProps), _react["default"].createElement("path", { | ||
}, restProps), /*#__PURE__*/_react["default"].createElement("path", { | ||
className: "".concat(prefixCls, "-line-trail"), | ||
@@ -116,3 +120,3 @@ d: pathString, | ||
stackPtg += ptg; | ||
return _react["default"].createElement("path", { | ||
return /*#__PURE__*/_react["default"].createElement("path", { | ||
key: index, | ||
@@ -119,0 +123,0 @@ className: "".concat(prefixCls, "-line-path"), |
{ | ||
"name": "rc-progress", | ||
"version": "2.5.2", | ||
"version": "2.5.3", | ||
"description": "progress ui component for react", | ||
@@ -57,3 +57,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"lint-staged": "^9.0.0", | ||
"lint-staged": "^10.0.1", | ||
"pre-commit": "1.x", | ||
@@ -69,4 +69,3 @@ "rc-tools": "9.x", | ||
"*.{js,jsx,ts,tsx}": [ | ||
"npm run pre-commit", | ||
"git add" | ||
"npm run pre-commit" | ||
] | ||
@@ -73,0 +72,0 @@ }, |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
0
0
1
59948
16
821