react-awesome-stars-rating 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/gradient.js +4 -1
- package/dist/index.js +9 -5
- package/package.json +7 -8
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# React Awesome Stars Rating · [](https://github.com/fedoryakubovich/react-awesome-stars-rating/blob/master/LICENSE) [](https://www.npmjs.com/package/react-awesome-stars-rating) [](https://www.travis-ci.com/) [](https://github.com/fedoryakubovich/react-awesome-stars-rating/blob/master/LICENSE) [](https://www.npmjs.com/package/react-awesome-stars-rating) [](https://www.travis-ci.com/) [](https://codecov.io/gh/fedoryakubovich/react-awesome-stars-rating)
|
|
2
2
|
|
|
3
3
|
React Awesome Stars Rating is a simple star component with easy integration for your React applications.
|
|
4
4
|
|
package/dist/gradient.js
CHANGED
|
@@ -25,7 +25,10 @@ var Gradient = function Gradient(_ref) {
|
|
|
25
25
|
offset = value % 1 * 100;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
return index === 1 && /*#__PURE__*/_react.default.createElement("defs",
|
|
28
|
+
return index === 1 && /*#__PURE__*/_react.default.createElement("defs", {
|
|
29
|
+
"data-testid": "gradient",
|
|
30
|
+
"data-offset": offset
|
|
31
|
+
}, /*#__PURE__*/_react.default.createElement("linearGradient", {
|
|
29
32
|
id: fullId
|
|
30
33
|
}, /*#__PURE__*/_react.default.createElement("stop", {
|
|
31
34
|
offset: "100%",
|
package/dist/index.js
CHANGED
|
@@ -21,7 +21,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && 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; }
|
|
23
23
|
|
|
24
|
-
function _extends() { _extends = Object.assign
|
|
24
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
25
25
|
|
|
26
26
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
27
27
|
|
|
@@ -37,7 +37,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
37
37
|
|
|
38
38
|
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 } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
39
39
|
|
|
40
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
40
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
41
41
|
|
|
42
42
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { 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); }; }
|
|
43
43
|
|
|
@@ -47,7 +47,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
47
47
|
|
|
48
48
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
49
49
|
|
|
50
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
50
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
51
51
|
|
|
52
52
|
var ReactStarsRating = /*#__PURE__*/function (_PureComponent) {
|
|
53
53
|
_inherits(ReactStarsRating, _PureComponent);
|
|
@@ -229,7 +229,8 @@ var ReactStarsRating = /*#__PURE__*/function (_PureComponent) {
|
|
|
229
229
|
starsList.push( /*#__PURE__*/_react.default.createElement("span", {
|
|
230
230
|
key: "react-stars-rating-char".concat(i),
|
|
231
231
|
className: "star star-".concat(i),
|
|
232
|
-
style: style
|
|
232
|
+
style: style,
|
|
233
|
+
"data-testid": "star"
|
|
233
234
|
}, /*#__PURE__*/_react.default.createElement(_star.default, _extends({
|
|
234
235
|
index: i,
|
|
235
236
|
value: value,
|
|
@@ -270,7 +271,10 @@ var ReactStarsRating = /*#__PURE__*/function (_PureComponent) {
|
|
|
270
271
|
role: "button"
|
|
271
272
|
}, props, {
|
|
272
273
|
style: isEdit ? _styles.default.activeContainer : _styles.default.inActiveContainer,
|
|
273
|
-
className: className
|
|
274
|
+
className: className,
|
|
275
|
+
"data-testid": "react-awesome-stars-rating",
|
|
276
|
+
"data-value": this.state.value,
|
|
277
|
+
"data-submitted": this.state.isSubmitted
|
|
274
278
|
}), stars);
|
|
275
279
|
}
|
|
276
280
|
}]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-awesome-stars-rating",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -63,25 +63,24 @@
|
|
|
63
63
|
"test": "react-scripts test",
|
|
64
64
|
"eject": "react-scripts eject",
|
|
65
65
|
"coverage": "react-scripts test --coverage --watchAll=false",
|
|
66
|
-
"coveralls": "npm run coverage && coveralls < coverage/lcov.info",
|
|
67
66
|
"upload": "NODE_ENV=production babel src/lib --out-dir dist",
|
|
68
67
|
"prepublishOnly": "npm run upload",
|
|
69
68
|
"clean": "./node_modules/.bin/rimraf build/"
|
|
70
69
|
},
|
|
71
70
|
"dependencies": {
|
|
72
71
|
"prop-types": "^15.8.1",
|
|
73
|
-
"react": "^
|
|
74
|
-
"react-dom": "^
|
|
72
|
+
"react": "^17.0.2",
|
|
73
|
+
"react-dom": "^17.0.2"
|
|
75
74
|
},
|
|
76
75
|
"devDependencies": {
|
|
77
76
|
"@babel/cli": "^7.18.9",
|
|
78
|
-
"@
|
|
79
|
-
"
|
|
80
|
-
"
|
|
77
|
+
"@testing-library/jest-dom": "^5.16.4",
|
|
78
|
+
"@testing-library/react": "^12.1.5",
|
|
79
|
+
"@testing-library/user-event": "^14.3.0",
|
|
81
80
|
"eslint-config-prettier": "^8.4.0",
|
|
82
81
|
"eslint-plugin-prettier": "^4.2.1",
|
|
83
82
|
"prettier": "^2.7.1",
|
|
84
|
-
"react-redux": "^
|
|
83
|
+
"react-redux": "^7.2.8",
|
|
85
84
|
"react-scripts": "5.0.1",
|
|
86
85
|
"redux": "^4.2.0",
|
|
87
86
|
"redux-form": "^8.3.8"
|