@contentful/field-editor-rating 2.3.3-canary.28 → 2.3.3-canary.31

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.
@@ -78,7 +78,7 @@ function RatingEditor({ field, parameters, isInitiallyDisabled = true }) {
78
78
  'instance',
79
79
  'stars'
80
80
  ]));
81
- return /*#__PURE__*/ _react.createElement(_fieldeditorshared.FieldConnector, {
81
+ return _react.createElement(_fieldeditorshared.FieldConnector, {
82
82
  debounce: 0,
83
83
  field: field,
84
84
  isInitiallyDisabled: isInitiallyDisabled
@@ -86,20 +86,20 @@ function RatingEditor({ field, parameters, isInitiallyDisabled = true }) {
86
86
  const clearOption = ()=>{
87
87
  setValue(null);
88
88
  };
89
- return /*#__PURE__*/ _react.createElement(_f36components.Flex, {
89
+ return _react.createElement(_f36components.Flex, {
90
90
  testId: "rating-editor",
91
91
  flexDirection: "row",
92
92
  marginTop: "spacingS"
93
- }, /*#__PURE__*/ _react.createElement(_RatingRibbon.RatingRibbon, {
93
+ }, _react.createElement(_RatingRibbon.RatingRibbon, {
94
94
  disabled: disabled,
95
95
  value: value,
96
96
  stars: starsCount,
97
97
  onSelect: (num)=>{
98
98
  setValue(num);
99
99
  }
100
- }), value !== undefined && !disabled && /*#__PURE__*/ _react.createElement(_f36components.Flex, {
100
+ }), value !== undefined && !disabled && _react.createElement(_f36components.Flex, {
101
101
  marginLeft: "spacingM"
102
- }, /*#__PURE__*/ _react.createElement(_f36components.TextLink, {
102
+ }, _react.createElement(_f36components.TextLink, {
103
103
  as: "button",
104
104
  testId: "rating-editor-clear",
105
105
  onClick: clearOption
@@ -55,7 +55,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
55
55
  (0, _vitest.afterEach)(_react1.cleanup);
56
56
  (0, _vitest.it)('renders 5 stars by default', ()=>{
57
57
  const [field] = (0, _fieldeditortestutils.createFakeFieldAPI)();
58
- const { getAllByTestId } = (0, _react1.render)(/*#__PURE__*/ _react.createElement(_RatingEditor.RatingEditor, {
58
+ const { getAllByTestId } = (0, _react1.render)(_react.createElement(_RatingEditor.RatingEditor, {
59
59
  field: field,
60
60
  isInitiallyDisabled: false
61
61
  }));
@@ -63,7 +63,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
63
63
  });
64
64
  (0, _vitest.it)('renders custom number of stars', ()=>{
65
65
  const [field] = (0, _fieldeditortestutils.createFakeFieldAPI)();
66
- const { getAllByTestId } = (0, _react1.render)(/*#__PURE__*/ _react.createElement(_RatingEditor.RatingEditor, {
66
+ const { getAllByTestId } = (0, _react1.render)(_react.createElement(_RatingEditor.RatingEditor, {
67
67
  field: field,
68
68
  isInitiallyDisabled: false,
69
69
  parameters: {
@@ -84,7 +84,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
84
84
  ...field
85
85
  };
86
86
  });
87
- const { container, getAllByTestId, getByTestId, queryByTestId } = (0, _react1.render)(/*#__PURE__*/ _react.createElement(_RatingEditor.RatingEditor, {
87
+ const { container, getAllByTestId, getByTestId, queryByTestId } = (0, _react1.render)(_react.createElement(_RatingEditor.RatingEditor, {
88
88
  field: field,
89
89
  isInitiallyDisabled: false
90
90
  }));
@@ -111,7 +111,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
111
111
  ...field
112
112
  };
113
113
  });
114
- const { container, getAllByTestId, queryByTestId } = (0, _react1.render)(/*#__PURE__*/ _react.createElement(_RatingEditor.RatingEditor, {
114
+ const { container, getAllByTestId, queryByTestId } = (0, _react1.render)(_react.createElement(_RatingEditor.RatingEditor, {
115
115
  field: field,
116
116
  isInitiallyDisabled: false
117
117
  }));
@@ -84,10 +84,10 @@ function RatingRibbon({ disabled, stars, value, onSelect }) {
84
84
  for(let i = 1; i <= stars; i++){
85
85
  items.push(i);
86
86
  }
87
- return /*#__PURE__*/ _react.createElement(_react.Fragment, null, items.map((num)=>/*#__PURE__*/ _react.createElement(_f36components.IconButton, {
87
+ return _react.createElement(_react.Fragment, null, items.map((num)=>_react.createElement(_f36components.IconButton, {
88
88
  variant: "transparent",
89
89
  size: "small",
90
- icon: /*#__PURE__*/ _react.createElement(_f36icons.StarIcon, {
90
+ icon: _react.createElement(_f36icons.StarIcon, {
91
91
  isActive: isSelected(num),
92
92
  color: isSelected(num) ? _f36tokens.default.colorPrimary : _f36tokens.default.gray600,
93
93
  className: (0, _css.css)({
@@ -22,7 +22,7 @@ export function RatingEditor({ field, parameters, isInitiallyDisabled = true })
22
22
  'instance',
23
23
  'stars'
24
24
  ]));
25
- return /*#__PURE__*/ React.createElement(FieldConnector, {
25
+ return React.createElement(FieldConnector, {
26
26
  debounce: 0,
27
27
  field: field,
28
28
  isInitiallyDisabled: isInitiallyDisabled
@@ -30,20 +30,20 @@ export function RatingEditor({ field, parameters, isInitiallyDisabled = true })
30
30
  const clearOption = ()=>{
31
31
  setValue(null);
32
32
  };
33
- return /*#__PURE__*/ React.createElement(Flex, {
33
+ return React.createElement(Flex, {
34
34
  testId: "rating-editor",
35
35
  flexDirection: "row",
36
36
  marginTop: "spacingS"
37
- }, /*#__PURE__*/ React.createElement(RatingRibbon, {
37
+ }, React.createElement(RatingRibbon, {
38
38
  disabled: disabled,
39
39
  value: value,
40
40
  stars: starsCount,
41
41
  onSelect: (num)=>{
42
42
  setValue(num);
43
43
  }
44
- }), value !== undefined && !disabled && /*#__PURE__*/ React.createElement(Flex, {
44
+ }), value !== undefined && !disabled && React.createElement(Flex, {
45
45
  marginLeft: "spacingM"
46
- }, /*#__PURE__*/ React.createElement(TextLink, {
46
+ }, React.createElement(TextLink, {
47
47
  as: "button",
48
48
  testId: "rating-editor-clear",
49
49
  onClick: clearOption
@@ -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(/*#__PURE__*/ 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(/*#__PURE__*/ 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(/*#__PURE__*/ 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(/*#__PURE__*/ React.createElement(RatingEditor, {
69
+ const { container, getAllByTestId, queryByTestId } = render(React.createElement(RatingEditor, {
70
70
  field: field,
71
71
  isInitiallyDisabled: false
72
72
  }));
@@ -28,10 +28,10 @@ export function RatingRibbon({ disabled, stars, value, onSelect }) {
28
28
  for(let i = 1; i <= stars; i++){
29
29
  items.push(i);
30
30
  }
31
- return /*#__PURE__*/ React.createElement(React.Fragment, null, items.map((num)=>/*#__PURE__*/ React.createElement(IconButton, {
31
+ return React.createElement(React.Fragment, null, items.map((num)=>React.createElement(IconButton, {
32
32
  variant: "transparent",
33
33
  size: "small",
34
- icon: /*#__PURE__*/ React.createElement(StarIcon, {
34
+ icon: React.createElement(StarIcon, {
35
35
  isActive: isSelected(num),
36
36
  color: isSelected(num) ? tokens.colorPrimary : tokens.gray600,
37
37
  className: css({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-rating",
3
- "version": "2.3.3-canary.28+dce976a5",
3
+ "version": "2.3.3-canary.31+1fb5b692",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -41,13 +41,13 @@
41
41
  "@contentful/f36-components": "^6.7.1",
42
42
  "@contentful/f36-icons": "^6.7.1",
43
43
  "@contentful/f36-tokens": "^6.1.2",
44
- "@contentful/field-editor-shared": "^4.6.3-canary.28+dce976a5",
44
+ "@contentful/field-editor-shared": "^4.6.3-canary.31+1fb5b692",
45
45
  "@emotion/css": "^11.13.5",
46
46
  "lodash": "^4.18.1"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@contentful/field-editor-test-utils": "^3.2.1",
50
- "@lingui/core": "5.3.0"
50
+ "@lingui/core": "5.9.5"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "@lingui/core": "^5.3.0",
@@ -63,5 +63,5 @@
63
63
  "prettier --write"
64
64
  ]
65
65
  },
66
- "gitHead": "dce976a59659a0c2ef12511f9449ac0100a50987"
66
+ "gitHead": "1fb5b69244b523826081471d8fe4e721b2e6c5ed"
67
67
  }