@contentful/field-editor-radio 1.5.23 → 1.6.1

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.
@@ -60,10 +60,10 @@ function RadioEditor(props) {
60
60
  const options = (0, _fieldeditordropdown.getOptions)(field);
61
61
  const misconfigured = options.length === 0;
62
62
  if (misconfigured) {
63
- return _react.createElement(_fieldeditorshared.PredefinedValuesError, null);
63
+ return /*#__PURE__*/ _react.createElement(_fieldeditorshared.PredefinedValuesError, null);
64
64
  }
65
65
  const direction = locales.direction[field.locale] || 'ltr';
66
- return _react.createElement(_fieldeditorshared.FieldConnector, {
66
+ return /*#__PURE__*/ _react.createElement(_fieldeditorshared.FieldConnector, {
67
67
  debounce: 0,
68
68
  field: field,
69
69
  isInitiallyDisabled: props.isInitiallyDisabled
@@ -74,7 +74,7 @@ function RadioEditor(props) {
74
74
  const clearOption = ()=>{
75
75
  setValue(undefined);
76
76
  };
77
- return _react.createElement(_f36components.Form, {
77
+ return /*#__PURE__*/ _react.createElement(_f36components.Form, {
78
78
  testId: "radio-editor",
79
79
  className: (0, _emotion.cx)(_styles.form, direction === 'rtl' ? _styles.rightToLeft : '')
80
80
  }, options.map((item, index)=>{
@@ -86,11 +86,11 @@ function RadioEditor(props) {
86
86
  item.id
87
87
  ].join('.');
88
88
  const checked = value === item.value;
89
- return _react.createElement(_f36components.Flex, {
89
+ return /*#__PURE__*/ _react.createElement(_f36components.Flex, {
90
90
  key: id,
91
91
  alignItems: "center",
92
92
  marginBottom: "spacingS"
93
- }, _react.createElement(_f36components.Radio, {
93
+ }, /*#__PURE__*/ _react.createElement(_f36components.Radio, {
94
94
  id: id,
95
95
  isDisabled: disabled,
96
96
  value: item.value === undefined ? '' : String(item.value),
@@ -100,7 +100,7 @@ function RadioEditor(props) {
100
100
  setOption(e.target.value);
101
101
  }
102
102
  }
103
- }, item.label), checked && !disabled && _react.createElement(_f36components.TextLink, {
103
+ }, item.label), checked && !disabled && /*#__PURE__*/ _react.createElement(_f36components.TextLink, {
104
104
  as: "button",
105
105
  className: _styles.clearBtn,
106
106
  onClick: clearOption
@@ -60,7 +60,7 @@ describe('RadioEditor', ()=>{
60
60
  validations: []
61
61
  };
62
62
  });
63
- const { getByTestId, queryByTestId } = (0, _react1.render)(_react.createElement(_RadioEditor.RadioEditor, {
63
+ const { getByTestId, queryByTestId } = (0, _react1.render)(/*#__PURE__*/ _react.createElement(_RadioEditor.RadioEditor, {
64
64
  field: field,
65
65
  locales: (0, _fieldeditortestutils.createFakeLocalesAPI)(),
66
66
  isInitiallyDisabled: false
@@ -84,7 +84,7 @@ describe('RadioEditor', ()=>{
84
84
  ]
85
85
  };
86
86
  });
87
- const { container } = (0, _react1.render)(_react.createElement(_RadioEditor.RadioEditor, {
87
+ const { container } = (0, _react1.render)(/*#__PURE__*/ _react.createElement(_RadioEditor.RadioEditor, {
88
88
  field: field,
89
89
  locales: (0, _fieldeditortestutils.createFakeLocalesAPI)(),
90
90
  isInitiallyDisabled: false
@@ -112,7 +112,7 @@ describe('RadioEditor', ()=>{
112
112
  ]
113
113
  };
114
114
  });
115
- const { container, queryByText, getByText } = (0, _react1.render)(_react.createElement(_RadioEditor.RadioEditor, {
115
+ const { container, queryByText, getByText } = (0, _react1.render)(/*#__PURE__*/ _react.createElement(_RadioEditor.RadioEditor, {
116
116
  field: field,
117
117
  locales: (0, _fieldeditortestutils.createFakeLocalesAPI)(),
118
118
  isInitiallyDisabled: false
@@ -147,7 +147,7 @@ describe('RadioEditor', ()=>{
147
147
  ]
148
148
  };
149
149
  });
150
- const { container, getByText } = (0, _react1.render)(_react.createElement(_RadioEditor.RadioEditor, {
150
+ const { container, getByText } = (0, _react1.render)(/*#__PURE__*/ _react.createElement(_RadioEditor.RadioEditor, {
151
151
  field: field,
152
152
  locales: (0, _fieldeditortestutils.createFakeLocalesAPI)(),
153
153
  isInitiallyDisabled: false
@@ -188,7 +188,7 @@ describe('RadioEditor', ()=>{
188
188
  ]
189
189
  };
190
190
  });
191
- const { container, getByText } = (0, _react1.render)(_react.createElement(_RadioEditor.RadioEditor, {
191
+ const { container, getByText } = (0, _react1.render)(/*#__PURE__*/ _react.createElement(_RadioEditor.RadioEditor, {
192
192
  field: field,
193
193
  locales: (0, _fieldeditortestutils.createFakeLocalesAPI)(),
194
194
  isInitiallyDisabled: false
@@ -9,10 +9,10 @@ export function RadioEditor(props) {
9
9
  const options = getOptions(field);
10
10
  const misconfigured = options.length === 0;
11
11
  if (misconfigured) {
12
- return React.createElement(PredefinedValuesError, null);
12
+ return /*#__PURE__*/ React.createElement(PredefinedValuesError, null);
13
13
  }
14
14
  const direction = locales.direction[field.locale] || 'ltr';
15
- return React.createElement(FieldConnector, {
15
+ return /*#__PURE__*/ React.createElement(FieldConnector, {
16
16
  debounce: 0,
17
17
  field: field,
18
18
  isInitiallyDisabled: props.isInitiallyDisabled
@@ -23,7 +23,7 @@ export function RadioEditor(props) {
23
23
  const clearOption = ()=>{
24
24
  setValue(undefined);
25
25
  };
26
- return React.createElement(Form, {
26
+ return /*#__PURE__*/ React.createElement(Form, {
27
27
  testId: "radio-editor",
28
28
  className: cx(styles.form, direction === 'rtl' ? styles.rightToLeft : '')
29
29
  }, options.map((item, index)=>{
@@ -35,11 +35,11 @@ export function RadioEditor(props) {
35
35
  item.id
36
36
  ].join('.');
37
37
  const checked = value === item.value;
38
- return React.createElement(Flex, {
38
+ return /*#__PURE__*/ React.createElement(Flex, {
39
39
  key: id,
40
40
  alignItems: "center",
41
41
  marginBottom: "spacingS"
42
- }, React.createElement(Radio, {
42
+ }, /*#__PURE__*/ React.createElement(Radio, {
43
43
  id: id,
44
44
  isDisabled: disabled,
45
45
  value: item.value === undefined ? '' : String(item.value),
@@ -49,7 +49,7 @@ export function RadioEditor(props) {
49
49
  setOption(e.target.value);
50
50
  }
51
51
  }
52
- }, item.label), checked && !disabled && React.createElement(TextLink, {
52
+ }, item.label), checked && !disabled && /*#__PURE__*/ React.createElement(TextLink, {
53
53
  as: "button",
54
54
  className: styles.clearBtn,
55
55
  onClick: clearOption
@@ -15,7 +15,7 @@ describe('RadioEditor', ()=>{
15
15
  validations: []
16
16
  };
17
17
  });
18
- const { getByTestId, queryByTestId } = render(React.createElement(RadioEditor, {
18
+ const { getByTestId, queryByTestId } = render(/*#__PURE__*/ React.createElement(RadioEditor, {
19
19
  field: field,
20
20
  locales: createFakeLocalesAPI(),
21
21
  isInitiallyDisabled: false
@@ -39,7 +39,7 @@ describe('RadioEditor', ()=>{
39
39
  ]
40
40
  };
41
41
  });
42
- const { container } = render(React.createElement(RadioEditor, {
42
+ const { container } = render(/*#__PURE__*/ React.createElement(RadioEditor, {
43
43
  field: field,
44
44
  locales: createFakeLocalesAPI(),
45
45
  isInitiallyDisabled: false
@@ -67,7 +67,7 @@ describe('RadioEditor', ()=>{
67
67
  ]
68
68
  };
69
69
  });
70
- const { container, queryByText, getByText } = render(React.createElement(RadioEditor, {
70
+ const { container, queryByText, getByText } = render(/*#__PURE__*/ React.createElement(RadioEditor, {
71
71
  field: field,
72
72
  locales: createFakeLocalesAPI(),
73
73
  isInitiallyDisabled: false
@@ -102,7 +102,7 @@ describe('RadioEditor', ()=>{
102
102
  ]
103
103
  };
104
104
  });
105
- const { container, getByText } = render(React.createElement(RadioEditor, {
105
+ const { container, getByText } = render(/*#__PURE__*/ React.createElement(RadioEditor, {
106
106
  field: field,
107
107
  locales: createFakeLocalesAPI(),
108
108
  isInitiallyDisabled: false
@@ -143,7 +143,7 @@ describe('RadioEditor', ()=>{
143
143
  ]
144
144
  };
145
145
  });
146
- const { container, getByText } = render(React.createElement(RadioEditor, {
146
+ const { container, getByText } = render(/*#__PURE__*/ React.createElement(RadioEditor, {
147
147
  field: field,
148
148
  locales: createFakeLocalesAPI(),
149
149
  isInitiallyDisabled: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-radio",
3
- "version": "1.5.23",
3
+ "version": "1.6.1",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -37,21 +37,23 @@
37
37
  "dependencies": {
38
38
  "@contentful/f36-components": "^4.70.0",
39
39
  "@contentful/f36-tokens": "^4.0.5",
40
- "@contentful/field-editor-dropdown": "^1.6.5",
41
- "@contentful/field-editor-shared": "^2.7.0",
40
+ "@contentful/field-editor-dropdown": "^1.7.1",
41
+ "@contentful/field-editor-shared": "^2.9.0",
42
42
  "emotion": "^10.0.17",
43
43
  "lodash": "^4.17.15",
44
44
  "nanoid": "^3.1.3"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@contentful/field-editor-test-utils": "^1.5.2",
48
+ "@lingui/core": "5.3.0",
48
49
  "contentful-management": "^11.0.0"
49
50
  },
50
51
  "peerDependencies": {
52
+ "@lingui/core": "^5.3.0",
51
53
  "react": ">=16.8.0"
52
54
  },
53
55
  "publishConfig": {
54
56
  "registry": "https://npm.pkg.github.com/"
55
57
  },
56
- "gitHead": "62868063532796d312b7002cac13f27ab3557110"
58
+ "gitHead": "44e5546797a12db4d96f290e039a483297265ffa"
57
59
  }