@contentful/field-editor-dropdown 1.6.5 → 1.7.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.
@@ -59,14 +59,14 @@ function DropdownEditor(props) {
59
59
  const options = (0, _dropdownUtils.getOptions)(field);
60
60
  const misconfigured = options.length === 0;
61
61
  if (misconfigured) {
62
- return _react.createElement(_fieldeditorshared.PredefinedValuesError, null);
62
+ return /*#__PURE__*/ _react.createElement(_fieldeditorshared.PredefinedValuesError, null);
63
63
  }
64
64
  const direction = locales.direction[field.locale] || 'ltr';
65
- return _react.createElement(_fieldeditorshared.FieldConnector, {
65
+ return /*#__PURE__*/ _react.createElement(_fieldeditorshared.FieldConnector, {
66
66
  debounce: 0,
67
67
  field: field,
68
68
  isInitiallyDisabled: props.isInitiallyDisabled
69
- }, ({ value, errors, disabled, setValue })=>_react.createElement(_f36components.Select, {
69
+ }, ({ value, errors, disabled, setValue })=>/*#__PURE__*/ _react.createElement(_f36components.Select, {
70
70
  testId: "dropdown-editor",
71
71
  id: id,
72
72
  isInvalid: errors.length > 0,
@@ -78,9 +78,9 @@ function DropdownEditor(props) {
78
78
  const value = e.target.value;
79
79
  setValue((0, _dropdownUtils.parseValue)(value, field.type));
80
80
  }
81
- }, _react.createElement(_f36components.Select.Option, {
81
+ }, /*#__PURE__*/ _react.createElement(_f36components.Select.Option, {
82
82
  value: ""
83
- }, "Choose a value"), options.map((option)=>_react.createElement(_f36components.Select.Option, {
83
+ }, "Choose a value"), options.map((option)=>/*#__PURE__*/ _react.createElement(_f36components.Select.Option, {
84
84
  key: option.value,
85
85
  value: String(option.value)
86
86
  }, option.label))));
@@ -60,7 +60,7 @@ describe('DropdownEditor', ()=>{
60
60
  validations: []
61
61
  };
62
62
  });
63
- const { getByTestId, queryByTestId } = (0, _react1.render)(_react.createElement(_DropdownEditor.DropdownEditor, {
63
+ const { getByTestId, queryByTestId } = (0, _react1.render)(/*#__PURE__*/ _react.createElement(_DropdownEditor.DropdownEditor, {
64
64
  field: field,
65
65
  locales: (0, _fieldeditortestutils.createFakeLocalesAPI)(),
66
66
  isInitiallyDisabled: false
@@ -84,7 +84,7 @@ describe('DropdownEditor', ()=>{
84
84
  ]
85
85
  };
86
86
  });
87
- const { container, getByText } = (0, _react1.render)(_react.createElement(_DropdownEditor.DropdownEditor, {
87
+ const { container, getByText } = (0, _react1.render)(/*#__PURE__*/ _react.createElement(_DropdownEditor.DropdownEditor, {
88
88
  field: field,
89
89
  locales: (0, _fieldeditortestutils.createFakeLocalesAPI)(),
90
90
  isInitiallyDisabled: false
@@ -110,7 +110,7 @@ describe('DropdownEditor', ()=>{
110
110
  ]
111
111
  };
112
112
  });
113
- const { getByTestId } = (0, _react1.render)(_react.createElement(_DropdownEditor.DropdownEditor, {
113
+ const { getByTestId } = (0, _react1.render)(/*#__PURE__*/ _react.createElement(_DropdownEditor.DropdownEditor, {
114
114
  field: field,
115
115
  locales: (0, _fieldeditortestutils.createFakeLocalesAPI)(),
116
116
  isInitiallyDisabled: false
@@ -140,7 +140,7 @@ describe('DropdownEditor', ()=>{
140
140
  ]
141
141
  };
142
142
  });
143
- const { getByTestId } = (0, _react1.render)(_react.createElement(_DropdownEditor.DropdownEditor, {
143
+ const { getByTestId } = (0, _react1.render)(/*#__PURE__*/ _react.createElement(_DropdownEditor.DropdownEditor, {
144
144
  field: field,
145
145
  locales: (0, _fieldeditortestutils.createFakeLocalesAPI)(),
146
146
  isInitiallyDisabled: false
@@ -173,7 +173,7 @@ describe('DropdownEditor', ()=>{
173
173
  ]
174
174
  };
175
175
  });
176
- const { getByTestId } = (0, _react1.render)(_react.createElement(_DropdownEditor.DropdownEditor, {
176
+ const { getByTestId } = (0, _react1.render)(/*#__PURE__*/ _react.createElement(_DropdownEditor.DropdownEditor, {
177
177
  field: field,
178
178
  locales: (0, _fieldeditortestutils.createFakeLocalesAPI)(),
179
179
  isInitiallyDisabled: false
@@ -210,7 +210,7 @@ describe('DropdownEditor', ()=>{
210
210
  ]
211
211
  };
212
212
  });
213
- const { getByTestId } = (0, _react1.render)(_react.createElement(_DropdownEditor.DropdownEditor, {
213
+ const { getByTestId } = (0, _react1.render)(/*#__PURE__*/ _react.createElement(_DropdownEditor.DropdownEditor, {
214
214
  field: field,
215
215
  locales: (0, _fieldeditortestutils.createFakeLocalesAPI)(),
216
216
  isInitiallyDisabled: false
@@ -8,14 +8,14 @@ export function DropdownEditor(props) {
8
8
  const options = getOptions(field);
9
9
  const misconfigured = options.length === 0;
10
10
  if (misconfigured) {
11
- return React.createElement(PredefinedValuesError, null);
11
+ return /*#__PURE__*/ React.createElement(PredefinedValuesError, null);
12
12
  }
13
13
  const direction = locales.direction[field.locale] || 'ltr';
14
- return React.createElement(FieldConnector, {
14
+ return /*#__PURE__*/ React.createElement(FieldConnector, {
15
15
  debounce: 0,
16
16
  field: field,
17
17
  isInitiallyDisabled: props.isInitiallyDisabled
18
- }, ({ value, errors, disabled, setValue })=>React.createElement(Select, {
18
+ }, ({ value, errors, disabled, setValue })=>/*#__PURE__*/ React.createElement(Select, {
19
19
  testId: "dropdown-editor",
20
20
  id: id,
21
21
  isInvalid: errors.length > 0,
@@ -27,9 +27,9 @@ export function DropdownEditor(props) {
27
27
  const value = e.target.value;
28
28
  setValue(parseValue(value, field.type));
29
29
  }
30
- }, React.createElement(Select.Option, {
30
+ }, /*#__PURE__*/ React.createElement(Select.Option, {
31
31
  value: ""
32
- }, "Choose a value"), options.map((option)=>React.createElement(Select.Option, {
32
+ }, "Choose a value"), options.map((option)=>/*#__PURE__*/ React.createElement(Select.Option, {
33
33
  key: option.value,
34
34
  value: String(option.value)
35
35
  }, option.label))));
@@ -15,7 +15,7 @@ describe('DropdownEditor', ()=>{
15
15
  validations: []
16
16
  };
17
17
  });
18
- const { getByTestId, queryByTestId } = render(React.createElement(DropdownEditor, {
18
+ const { getByTestId, queryByTestId } = render(/*#__PURE__*/ React.createElement(DropdownEditor, {
19
19
  field: field,
20
20
  locales: createFakeLocalesAPI(),
21
21
  isInitiallyDisabled: false
@@ -39,7 +39,7 @@ describe('DropdownEditor', ()=>{
39
39
  ]
40
40
  };
41
41
  });
42
- const { container, getByText } = render(React.createElement(DropdownEditor, {
42
+ const { container, getByText } = render(/*#__PURE__*/ React.createElement(DropdownEditor, {
43
43
  field: field,
44
44
  locales: createFakeLocalesAPI(),
45
45
  isInitiallyDisabled: false
@@ -65,7 +65,7 @@ describe('DropdownEditor', ()=>{
65
65
  ]
66
66
  };
67
67
  });
68
- const { getByTestId } = render(React.createElement(DropdownEditor, {
68
+ const { getByTestId } = render(/*#__PURE__*/ React.createElement(DropdownEditor, {
69
69
  field: field,
70
70
  locales: createFakeLocalesAPI(),
71
71
  isInitiallyDisabled: false
@@ -95,7 +95,7 @@ describe('DropdownEditor', ()=>{
95
95
  ]
96
96
  };
97
97
  });
98
- const { getByTestId } = render(React.createElement(DropdownEditor, {
98
+ const { getByTestId } = render(/*#__PURE__*/ React.createElement(DropdownEditor, {
99
99
  field: field,
100
100
  locales: createFakeLocalesAPI(),
101
101
  isInitiallyDisabled: false
@@ -128,7 +128,7 @@ describe('DropdownEditor', ()=>{
128
128
  ]
129
129
  };
130
130
  });
131
- const { getByTestId } = render(React.createElement(DropdownEditor, {
131
+ const { getByTestId } = render(/*#__PURE__*/ React.createElement(DropdownEditor, {
132
132
  field: field,
133
133
  locales: createFakeLocalesAPI(),
134
134
  isInitiallyDisabled: false
@@ -165,7 +165,7 @@ describe('DropdownEditor', ()=>{
165
165
  ]
166
166
  };
167
167
  });
168
- const { getByTestId } = render(React.createElement(DropdownEditor, {
168
+ const { getByTestId } = render(/*#__PURE__*/ React.createElement(DropdownEditor, {
169
169
  field: field,
170
170
  locales: createFakeLocalesAPI(),
171
171
  isInitiallyDisabled: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-dropdown",
3
- "version": "1.6.5",
3
+ "version": "1.7.1",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -37,20 +37,22 @@
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.7.0",
40
+ "@contentful/field-editor-shared": "^2.9.0",
41
41
  "emotion": "^10.0.0",
42
42
  "lodash": "^4.17.15",
43
43
  "nanoid": "^3.1.3"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@contentful/field-editor-test-utils": "^1.5.2",
47
+ "@lingui/core": "5.3.0",
47
48
  "contentful-management": "^11.0.0"
48
49
  },
49
50
  "peerDependencies": {
51
+ "@lingui/core": "^5.3.0",
50
52
  "react": ">=16.8.0"
51
53
  },
52
54
  "publishConfig": {
53
55
  "registry": "https://npm.pkg.github.com/"
54
56
  },
55
- "gitHead": "62868063532796d312b7002cac13f27ab3557110"
57
+ "gitHead": "44e5546797a12db4d96f290e039a483297265ffa"
56
58
  }