@contentful/field-editor-rating 1.4.4 → 1.4.6

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.
@@ -39,7 +39,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
39
39
  if (cache && cache.has(obj)) {
40
40
  return cache.get(obj);
41
41
  }
42
- var newObj = {};
42
+ var newObj = {
43
+ __proto__: null
44
+ };
43
45
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
44
46
  for(var key in obj){
45
47
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -72,7 +74,7 @@ function getStarCount(count) {
72
74
  }
73
75
  }
74
76
  function RatingEditor(props) {
75
- const { field } = props;
77
+ const { field } = props;
76
78
  const starsCount = getStarCount((0, _get.default)(props.parameters, [
77
79
  'instance',
78
80
  'stars'
@@ -81,7 +83,7 @@ function RatingEditor(props) {
81
83
  debounce: 0,
82
84
  field: field,
83
85
  isInitiallyDisabled: props.isInitiallyDisabled
84
- }, ({ disabled , value , setValue })=>{
86
+ }, ({ disabled, value, setValue })=>{
85
87
  const clearOption = ()=>{
86
88
  setValue(null);
87
89
  };
@@ -28,7 +28,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
28
28
  if (cache && cache.has(obj)) {
29
29
  return cache.get(obj);
30
30
  }
31
- var newObj = {};
31
+ var newObj = {
32
+ __proto__: null
33
+ };
32
34
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
33
35
  for(var key in obj){
34
36
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -53,7 +55,7 @@ describe('RatingEditor', ()=>{
53
55
  afterEach(_react1.cleanup);
54
56
  it('renders 5 stars by default', ()=>{
55
57
  const [field] = (0, _fieldeditortestutils.createFakeFieldAPI)();
56
- const { getAllByTestId } = (0, _react1.render)(_react.createElement(_RatingEditor.RatingEditor, {
58
+ const { getAllByTestId } = (0, _react1.render)(_react.createElement(_RatingEditor.RatingEditor, {
57
59
  field: field,
58
60
  isInitiallyDisabled: false
59
61
  }));
@@ -61,7 +63,7 @@ describe('RatingEditor', ()=>{
61
63
  });
62
64
  it('renders custom number of stars', ()=>{
63
65
  const [field] = (0, _fieldeditortestutils.createFakeFieldAPI)();
64
- const { getAllByTestId } = (0, _react1.render)(_react.createElement(_RatingEditor.RatingEditor, {
66
+ const { getAllByTestId } = (0, _react1.render)(_react.createElement(_RatingEditor.RatingEditor, {
65
67
  field: field,
66
68
  isInitiallyDisabled: false,
67
69
  parameters: {
@@ -82,7 +84,7 @@ describe('RatingEditor', ()=>{
82
84
  ...field
83
85
  };
84
86
  });
85
- const { container , getAllByTestId , getByTestId , queryByTestId } = (0, _react1.render)(_react.createElement(_RatingEditor.RatingEditor, {
87
+ const { container, getAllByTestId, getByTestId, queryByTestId } = (0, _react1.render)(_react.createElement(_RatingEditor.RatingEditor, {
86
88
  field: field,
87
89
  isInitiallyDisabled: false
88
90
  }));
@@ -109,7 +111,7 @@ describe('RatingEditor', ()=>{
109
111
  ...field
110
112
  };
111
113
  });
112
- const { container , getAllByTestId , queryByTestId } = (0, _react1.render)(_react.createElement(_RatingEditor.RatingEditor, {
114
+ const { container, getAllByTestId, queryByTestId } = (0, _react1.render)(_react.createElement(_RatingEditor.RatingEditor, {
113
115
  field: field,
114
116
  isInitiallyDisabled: false
115
117
  }));
@@ -46,7 +46,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
46
46
  if (cache && cache.has(obj)) {
47
47
  return cache.get(obj);
48
48
  }
49
- var newObj = {};
49
+ var newObj = {
50
+ __proto__: null
51
+ };
50
52
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
51
53
  for(var key in obj){
52
54
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -18,7 +18,7 @@ function getStarCount(count) {
18
18
  }
19
19
  }
20
20
  export function RatingEditor(props) {
21
- const { field } = props;
21
+ const { field } = props;
22
22
  const starsCount = getStarCount(get(props.parameters, [
23
23
  'instance',
24
24
  'stars'
@@ -27,7 +27,7 @@ export function RatingEditor(props) {
27
27
  debounce: 0,
28
28
  field: field,
29
29
  isInitiallyDisabled: props.isInitiallyDisabled
30
- }, ({ disabled , value , setValue })=>{
30
+ }, ({ disabled, value, setValue })=>{
31
31
  const clearOption = ()=>{
32
32
  setValue(null);
33
33
  };
@@ -10,7 +10,7 @@ describe('RatingEditor', ()=>{
10
10
  afterEach(cleanup);
11
11
  it('renders 5 stars by default', ()=>{
12
12
  const [field] = createFakeFieldAPI();
13
- const { getAllByTestId } = render(React.createElement(RatingEditor, {
13
+ const { getAllByTestId } = render(React.createElement(RatingEditor, {
14
14
  field: field,
15
15
  isInitiallyDisabled: false
16
16
  }));
@@ -18,7 +18,7 @@ describe('RatingEditor', ()=>{
18
18
  });
19
19
  it('renders custom number of stars', ()=>{
20
20
  const [field] = createFakeFieldAPI();
21
- const { getAllByTestId } = render(React.createElement(RatingEditor, {
21
+ const { getAllByTestId } = render(React.createElement(RatingEditor, {
22
22
  field: field,
23
23
  isInitiallyDisabled: false,
24
24
  parameters: {
@@ -39,7 +39,7 @@ describe('RatingEditor', ()=>{
39
39
  ...field
40
40
  };
41
41
  });
42
- const { container , getAllByTestId , getByTestId , queryByTestId } = render(React.createElement(RatingEditor, {
42
+ const { container, getAllByTestId, getByTestId, queryByTestId } = render(React.createElement(RatingEditor, {
43
43
  field: field,
44
44
  isInitiallyDisabled: false
45
45
  }));
@@ -66,7 +66,7 @@ describe('RatingEditor', ()=>{
66
66
  ...field
67
67
  };
68
68
  });
69
- const { container , getAllByTestId , queryByTestId } = render(React.createElement(RatingEditor, {
69
+ const { container, getAllByTestId, queryByTestId } = render(React.createElement(RatingEditor, {
70
70
  field: field,
71
71
  isInitiallyDisabled: false
72
72
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-rating",
3
- "version": "1.4.4",
3
+ "version": "1.4.6",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -37,12 +37,12 @@
37
37
  "dependencies": {
38
38
  "@contentful/f36-components": "^4.0.27",
39
39
  "@contentful/f36-tokens": "^4.0.0",
40
- "@contentful/field-editor-shared": "^1.4.4",
40
+ "@contentful/field-editor-shared": "^1.4.6",
41
41
  "emotion": "^10.0.17",
42
42
  "lodash": "^4.17.15"
43
43
  },
44
44
  "devDependencies": {
45
- "@contentful/field-editor-test-utils": "^1.4.5"
45
+ "@contentful/field-editor-test-utils": "^1.4.7"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "react": ">=16.8.0"
@@ -50,5 +50,5 @@
50
50
  "publishConfig": {
51
51
  "registry": "https://npm.pkg.github.com/"
52
52
  },
53
- "gitHead": "b1f62d6b934520b6d4dc328921dd500381d1e22c"
53
+ "gitHead": "894934e9a2888aeb0a894cfebea3e034ba830f2a"
54
54
  }