@contentful/field-editor-rating 1.4.32 → 1.4.33

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.
@@ -8,10 +8,10 @@ Object.defineProperty(exports, "RatingEditor", {
8
8
  return RatingEditor;
9
9
  }
10
10
  });
11
- const _react = _interop_require_wildcard(require("react"));
11
+ const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
12
12
  const _f36components = require("@contentful/f36-components");
13
13
  const _fieldeditorshared = require("@contentful/field-editor-shared");
14
- const _get = _interop_require_default(require("lodash/get"));
14
+ const _get = /*#__PURE__*/ _interop_require_default(require("lodash/get"));
15
15
  const _RatingRibbon = require("./RatingRibbon");
16
16
  function _interop_require_default(obj) {
17
17
  return obj && obj.__esModule ? obj : {
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _react = _interop_require_wildcard(require("react"));
5
+ const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
6
6
  const _fieldeditortestutils = require("@contentful/field-editor-test-utils");
7
7
  require("@testing-library/jest-dom/extend-expect");
8
8
  const _react1 = require("@testing-library/react");
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "RatingRibbon", {
8
8
  return RatingRibbon;
9
9
  }
10
10
  });
11
- const _react = _interop_require_wildcard(require("react"));
11
+ const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
12
12
  const _f36components = require("@contentful/f36-components");
13
13
  const _f36icons = require("@contentful/f36-icons");
14
14
  const _emotion = require("emotion");
@@ -102,11 +102,9 @@ class RatingRibbon extends _react.Component {
102
102
  })));
103
103
  }
104
104
  constructor(...args){
105
- super(...args);
106
- _define_property(this, "state", {
105
+ super(...args), _define_property(this, "state", {
107
106
  hovered: null
108
- });
109
- _define_property(this, "isSelected", (num)=>{
107
+ }), _define_property(this, "isSelected", (num)=>{
110
108
  const hovered = this.state.hovered;
111
109
  const value = this.props.value;
112
110
  if (hovered !== null) {
@@ -116,15 +114,13 @@ class RatingRibbon extends _react.Component {
116
114
  return num <= value;
117
115
  }
118
116
  return false;
119
- });
120
- _define_property(this, "onBlur", ()=>{
117
+ }), _define_property(this, "onBlur", ()=>{
121
118
  if (!this.props.disabled) {
122
119
  this.setState({
123
120
  hovered: null
124
121
  });
125
122
  }
126
- });
127
- _define_property(this, "onFocus", (num)=>()=>{
123
+ }), _define_property(this, "onFocus", (num)=>()=>{
128
124
  if (!this.props.disabled) {
129
125
  this.setState({
130
126
  hovered: num
@@ -51,11 +51,9 @@ export class RatingRibbon extends React.Component {
51
51
  })));
52
52
  }
53
53
  constructor(...args){
54
- super(...args);
55
- _define_property(this, "state", {
54
+ super(...args), _define_property(this, "state", {
56
55
  hovered: null
57
- });
58
- _define_property(this, "isSelected", (num)=>{
56
+ }), _define_property(this, "isSelected", (num)=>{
59
57
  const hovered = this.state.hovered;
60
58
  const value = this.props.value;
61
59
  if (hovered !== null) {
@@ -65,15 +63,13 @@ export class RatingRibbon extends React.Component {
65
63
  return num <= value;
66
64
  }
67
65
  return false;
68
- });
69
- _define_property(this, "onBlur", ()=>{
66
+ }), _define_property(this, "onBlur", ()=>{
70
67
  if (!this.props.disabled) {
71
68
  this.setState({
72
69
  hovered: null
73
70
  });
74
71
  }
75
- });
76
- _define_property(this, "onFocus", (num)=>()=>{
72
+ }), _define_property(this, "onFocus", (num)=>()=>{
77
73
  if (!this.props.disabled) {
78
74
  this.setState({
79
75
  hovered: num
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-rating",
3
- "version": "1.4.32",
3
+ "version": "1.4.33",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -37,7 +37,7 @@
37
37
  "dependencies": {
38
38
  "@contentful/f36-components": "^4.70.0",
39
39
  "@contentful/f36-tokens": "^4.0.5",
40
- "@contentful/field-editor-shared": "^2.4.0",
40
+ "@contentful/field-editor-shared": "^2.4.1",
41
41
  "emotion": "^10.0.17",
42
42
  "lodash": "^4.17.15"
43
43
  },
@@ -50,5 +50,5 @@
50
50
  "publishConfig": {
51
51
  "registry": "https://npm.pkg.github.com/"
52
52
  },
53
- "gitHead": "acf662acf17e749090975671bf14ce107ac9c499"
53
+ "gitHead": "1d0dc6dc10cf4ad43aa48b04fa67d29ab7edaee8"
54
54
  }