@contentful/field-editor-boolean 1.5.5 → 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.
package/dist/cjs/Boolean.spec.js
CHANGED
|
@@ -55,7 +55,7 @@ describe('BooleanEditor', ()=>{
|
|
|
55
55
|
afterEach(_react1.cleanup);
|
|
56
56
|
it('renders inputs for true and false values', ()=>{
|
|
57
57
|
const [field] = (0, _fieldeditortestutils.createFakeFieldAPI)();
|
|
58
|
-
const { container, getByLabelText } = (0, _react1.render)(_react.createElement(_BooleanEditor.BooleanEditor, {
|
|
58
|
+
const { container, getByLabelText } = (0, _react1.render)(/*#__PURE__*/ _react.createElement(_BooleanEditor.BooleanEditor, {
|
|
59
59
|
field: field,
|
|
60
60
|
isInitiallyDisabled: false
|
|
61
61
|
}));
|
|
@@ -83,7 +83,7 @@ describe('BooleanEditor', ()=>{
|
|
|
83
83
|
...field
|
|
84
84
|
};
|
|
85
85
|
});
|
|
86
|
-
const { getByLabelText, queryByText, getByText } = (0, _react1.render)(_react.createElement(_BooleanEditor.BooleanEditor, {
|
|
86
|
+
const { getByLabelText, queryByText, getByText } = (0, _react1.render)(/*#__PURE__*/ _react.createElement(_BooleanEditor.BooleanEditor, {
|
|
87
87
|
field: field,
|
|
88
88
|
isInitiallyDisabled: false,
|
|
89
89
|
parameters: {
|
|
@@ -108,7 +108,7 @@ describe('BooleanEditor', ()=>{
|
|
|
108
108
|
const [field] = (0, _fieldeditortestutils.createFakeFieldAPI)((field)=>{
|
|
109
109
|
return field;
|
|
110
110
|
}, true);
|
|
111
|
-
const { getByTestId, getByLabelText } = (0, _react1.render)(_react.createElement(_BooleanEditor.BooleanEditor, {
|
|
111
|
+
const { getByTestId, getByLabelText } = (0, _react1.render)(/*#__PURE__*/ _react.createElement(_BooleanEditor.BooleanEditor, {
|
|
112
112
|
field: field,
|
|
113
113
|
isInitiallyDisabled: true
|
|
114
114
|
}));
|
|
@@ -79,7 +79,7 @@ function BooleanEditor(props) {
|
|
|
79
79
|
id: (0, _nanoid.nanoid)(6)
|
|
80
80
|
}
|
|
81
81
|
];
|
|
82
|
-
return _react.createElement(_fieldeditorshared.FieldConnector, {
|
|
82
|
+
return /*#__PURE__*/ _react.createElement(_fieldeditorshared.FieldConnector, {
|
|
83
83
|
debounce: 0,
|
|
84
84
|
field: field,
|
|
85
85
|
isInitiallyDisabled: props.isInitiallyDisabled
|
|
@@ -90,7 +90,7 @@ function BooleanEditor(props) {
|
|
|
90
90
|
const clearOption = ()=>{
|
|
91
91
|
setValue(null);
|
|
92
92
|
};
|
|
93
|
-
return _react.createElement(_f36components.Flex, {
|
|
93
|
+
return /*#__PURE__*/ _react.createElement(_f36components.Flex, {
|
|
94
94
|
testId: "boolean-editor",
|
|
95
95
|
alignItems: "center",
|
|
96
96
|
marginTop: "spacingS"
|
|
@@ -103,10 +103,10 @@ function BooleanEditor(props) {
|
|
|
103
103
|
option.id
|
|
104
104
|
].join('.');
|
|
105
105
|
const checked = value === option.value;
|
|
106
|
-
return _react.createElement(_f36components.Flex, {
|
|
106
|
+
return /*#__PURE__*/ _react.createElement(_f36components.Flex, {
|
|
107
107
|
marginRight: "spacingM",
|
|
108
108
|
key: id
|
|
109
|
-
}, _react.createElement(_f36components.Radio, {
|
|
109
|
+
}, /*#__PURE__*/ _react.createElement(_f36components.Radio, {
|
|
110
110
|
id: id,
|
|
111
111
|
isDisabled: disabled,
|
|
112
112
|
value: option.value === undefined ? '' : String(option.value),
|
|
@@ -117,7 +117,7 @@ function BooleanEditor(props) {
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
}, option.label));
|
|
120
|
-
}), value !== undefined && _react.createElement(_f36components.TextLink, {
|
|
120
|
+
}), value !== undefined && /*#__PURE__*/ _react.createElement(_f36components.TextLink, {
|
|
121
121
|
as: "button",
|
|
122
122
|
testId: "boolean-editor-clear",
|
|
123
123
|
isDisabled: disabled,
|
package/dist/esm/Boolean.spec.js
CHANGED
|
@@ -10,7 +10,7 @@ describe('BooleanEditor', ()=>{
|
|
|
10
10
|
afterEach(cleanup);
|
|
11
11
|
it('renders inputs for true and false values', ()=>{
|
|
12
12
|
const [field] = createFakeFieldAPI();
|
|
13
|
-
const { container, getByLabelText } = render(React.createElement(BooleanEditor, {
|
|
13
|
+
const { container, getByLabelText } = render(/*#__PURE__*/ React.createElement(BooleanEditor, {
|
|
14
14
|
field: field,
|
|
15
15
|
isInitiallyDisabled: false
|
|
16
16
|
}));
|
|
@@ -38,7 +38,7 @@ describe('BooleanEditor', ()=>{
|
|
|
38
38
|
...field
|
|
39
39
|
};
|
|
40
40
|
});
|
|
41
|
-
const { getByLabelText, queryByText, getByText } = render(React.createElement(BooleanEditor, {
|
|
41
|
+
const { getByLabelText, queryByText, getByText } = render(/*#__PURE__*/ React.createElement(BooleanEditor, {
|
|
42
42
|
field: field,
|
|
43
43
|
isInitiallyDisabled: false,
|
|
44
44
|
parameters: {
|
|
@@ -63,7 +63,7 @@ describe('BooleanEditor', ()=>{
|
|
|
63
63
|
const [field] = createFakeFieldAPI((field)=>{
|
|
64
64
|
return field;
|
|
65
65
|
}, true);
|
|
66
|
-
const { getByTestId, getByLabelText } = render(React.createElement(BooleanEditor, {
|
|
66
|
+
const { getByTestId, getByLabelText } = render(/*#__PURE__*/ React.createElement(BooleanEditor, {
|
|
67
67
|
field: field,
|
|
68
68
|
isInitiallyDisabled: true
|
|
69
69
|
}));
|
|
@@ -23,7 +23,7 @@ export function BooleanEditor(props) {
|
|
|
23
23
|
id: nanoid(6)
|
|
24
24
|
}
|
|
25
25
|
];
|
|
26
|
-
return React.createElement(FieldConnector, {
|
|
26
|
+
return /*#__PURE__*/ React.createElement(FieldConnector, {
|
|
27
27
|
debounce: 0,
|
|
28
28
|
field: field,
|
|
29
29
|
isInitiallyDisabled: props.isInitiallyDisabled
|
|
@@ -34,7 +34,7 @@ export function BooleanEditor(props) {
|
|
|
34
34
|
const clearOption = ()=>{
|
|
35
35
|
setValue(null);
|
|
36
36
|
};
|
|
37
|
-
return React.createElement(Flex, {
|
|
37
|
+
return /*#__PURE__*/ React.createElement(Flex, {
|
|
38
38
|
testId: "boolean-editor",
|
|
39
39
|
alignItems: "center",
|
|
40
40
|
marginTop: "spacingS"
|
|
@@ -47,10 +47,10 @@ export function BooleanEditor(props) {
|
|
|
47
47
|
option.id
|
|
48
48
|
].join('.');
|
|
49
49
|
const checked = value === option.value;
|
|
50
|
-
return React.createElement(Flex, {
|
|
50
|
+
return /*#__PURE__*/ React.createElement(Flex, {
|
|
51
51
|
marginRight: "spacingM",
|
|
52
52
|
key: id
|
|
53
|
-
}, React.createElement(Radio, {
|
|
53
|
+
}, /*#__PURE__*/ React.createElement(Radio, {
|
|
54
54
|
id: id,
|
|
55
55
|
isDisabled: disabled,
|
|
56
56
|
value: option.value === undefined ? '' : String(option.value),
|
|
@@ -61,7 +61,7 @@ export function BooleanEditor(props) {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
}, option.label));
|
|
64
|
-
}), value !== undefined && React.createElement(TextLink, {
|
|
64
|
+
}), value !== undefined && /*#__PURE__*/ React.createElement(TextLink, {
|
|
65
65
|
as: "button",
|
|
66
66
|
testId: "boolean-editor-clear",
|
|
67
67
|
isDisabled: disabled,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/field-editor-boolean",
|
|
3
|
-
"version": "1.
|
|
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,19 +37,21 @@
|
|
|
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.
|
|
40
|
+
"@contentful/field-editor-shared": "^2.9.0",
|
|
41
41
|
"emotion": "^10.0.17",
|
|
42
42
|
"lodash": "^4.17.15",
|
|
43
43
|
"nanoid": "^3.1.3"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@contentful/field-editor-test-utils": "^1.5.2"
|
|
46
|
+
"@contentful/field-editor-test-utils": "^1.5.2",
|
|
47
|
+
"@lingui/core": "5.3.0"
|
|
47
48
|
},
|
|
48
49
|
"peerDependencies": {
|
|
50
|
+
"@lingui/core": "^5.3.0",
|
|
49
51
|
"react": ">=16.8.0"
|
|
50
52
|
},
|
|
51
53
|
"publishConfig": {
|
|
52
54
|
"registry": "https://npm.pkg.github.com/"
|
|
53
55
|
},
|
|
54
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "44e5546797a12db4d96f290e039a483297265ffa"
|
|
55
57
|
}
|