@contentful/field-editor-url 1.4.5 → 1.4.7
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/UrlEditor.js
CHANGED
|
@@ -54,13 +54,13 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
54
54
|
}
|
|
55
55
|
function UrlEditor(props) {
|
|
56
56
|
const { field, id } = props;
|
|
57
|
-
return _react.createElement(_fieldeditorshared.FieldConnector, {
|
|
57
|
+
return /*#__PURE__*/ _react.createElement(_fieldeditorshared.FieldConnector, {
|
|
58
58
|
field: field,
|
|
59
59
|
isInitiallyDisabled: props.isInitiallyDisabled
|
|
60
60
|
}, ({ value, errors, disabled, setValue })=>{
|
|
61
|
-
return _react.createElement("div", {
|
|
61
|
+
return /*#__PURE__*/ _react.createElement("div", {
|
|
62
62
|
"data-test-id": "url-editor"
|
|
63
|
-
}, _react.createElement(_f36components.TextInput, {
|
|
63
|
+
}, /*#__PURE__*/ _react.createElement(_f36components.TextInput, {
|
|
64
64
|
id: id,
|
|
65
65
|
isRequired: field.required,
|
|
66
66
|
isInvalid: errors.length > 0,
|
|
@@ -55,7 +55,7 @@ describe('UrlEditor', ()=>{
|
|
|
55
55
|
afterEach(_react1.cleanup);
|
|
56
56
|
it('renders without crashing', ()=>{
|
|
57
57
|
const [field] = (0, _fieldeditortestutils.createFakeFieldAPI)();
|
|
58
|
-
(0, _react1.render)(_react.createElement(_UrlEditor.UrlEditor, {
|
|
58
|
+
(0, _react1.render)(/*#__PURE__*/ _react.createElement(_UrlEditor.UrlEditor, {
|
|
59
59
|
field: field,
|
|
60
60
|
isInitiallyDisabled: false
|
|
61
61
|
}));
|
|
@@ -71,7 +71,7 @@ describe('UrlEditor', ()=>{
|
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
73
|
});
|
|
74
|
-
const { getByTestId } = (0, _react1.render)(_react.createElement(_UrlEditor.UrlEditor, {
|
|
74
|
+
const { getByTestId } = (0, _react1.render)(/*#__PURE__*/ _react.createElement(_UrlEditor.UrlEditor, {
|
|
75
75
|
field: field,
|
|
76
76
|
isInitiallyDisabled: false
|
|
77
77
|
}));
|
|
@@ -86,7 +86,7 @@ describe('UrlEditor', ()=>{
|
|
|
86
86
|
id: 'field-id'
|
|
87
87
|
};
|
|
88
88
|
});
|
|
89
|
-
const { getByTestId } = (0, _react1.render)(_react.createElement(_UrlEditor.UrlEditor, {
|
|
89
|
+
const { getByTestId } = (0, _react1.render)(/*#__PURE__*/ _react.createElement(_UrlEditor.UrlEditor, {
|
|
90
90
|
field: field,
|
|
91
91
|
isInitiallyDisabled: false
|
|
92
92
|
}));
|
|
@@ -124,11 +124,11 @@ describe('UrlEditor', ()=>{
|
|
|
124
124
|
}
|
|
125
125
|
};
|
|
126
126
|
});
|
|
127
|
-
const { getByTestId, getByText } = (0, _react1.render)(_react.createElement(_UrlEditor.UrlEditor, {
|
|
127
|
+
const { getByTestId, getByText } = (0, _react1.render)(/*#__PURE__*/ _react.createElement(_UrlEditor.UrlEditor, {
|
|
128
128
|
field: field,
|
|
129
129
|
isInitiallyDisabled: false
|
|
130
130
|
}, ({ value })=>{
|
|
131
|
-
return _react.createElement("div", null, "Custom preview: ", value);
|
|
131
|
+
return /*#__PURE__*/ _react.createElement("div", null, "Custom preview: ", value);
|
|
132
132
|
}));
|
|
133
133
|
const $input = getByTestId('cf-ui-text-input');
|
|
134
134
|
expect($input).toHaveValue(initialValue);
|
package/dist/esm/UrlEditor.js
CHANGED
|
@@ -3,13 +3,13 @@ import { TextInput } from '@contentful/f36-components';
|
|
|
3
3
|
import { FieldConnector } from '@contentful/field-editor-shared';
|
|
4
4
|
export function UrlEditor(props) {
|
|
5
5
|
const { field, id } = props;
|
|
6
|
-
return React.createElement(FieldConnector, {
|
|
6
|
+
return /*#__PURE__*/ React.createElement(FieldConnector, {
|
|
7
7
|
field: field,
|
|
8
8
|
isInitiallyDisabled: props.isInitiallyDisabled
|
|
9
9
|
}, ({ value, errors, disabled, setValue })=>{
|
|
10
|
-
return React.createElement("div", {
|
|
10
|
+
return /*#__PURE__*/ React.createElement("div", {
|
|
11
11
|
"data-test-id": "url-editor"
|
|
12
|
-
}, React.createElement(TextInput, {
|
|
12
|
+
}, /*#__PURE__*/ React.createElement(TextInput, {
|
|
13
13
|
id: id,
|
|
14
14
|
isRequired: field.required,
|
|
15
15
|
isInvalid: errors.length > 0,
|
|
@@ -10,7 +10,7 @@ describe('UrlEditor', ()=>{
|
|
|
10
10
|
afterEach(cleanup);
|
|
11
11
|
it('renders without crashing', ()=>{
|
|
12
12
|
const [field] = createFakeFieldAPI();
|
|
13
|
-
render(React.createElement(UrlEditor, {
|
|
13
|
+
render(/*#__PURE__*/ React.createElement(UrlEditor, {
|
|
14
14
|
field: field,
|
|
15
15
|
isInitiallyDisabled: false
|
|
16
16
|
}));
|
|
@@ -26,7 +26,7 @@ describe('UrlEditor', ()=>{
|
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
});
|
|
29
|
-
const { getByTestId } = render(React.createElement(UrlEditor, {
|
|
29
|
+
const { getByTestId } = render(/*#__PURE__*/ React.createElement(UrlEditor, {
|
|
30
30
|
field: field,
|
|
31
31
|
isInitiallyDisabled: false
|
|
32
32
|
}));
|
|
@@ -41,7 +41,7 @@ describe('UrlEditor', ()=>{
|
|
|
41
41
|
id: 'field-id'
|
|
42
42
|
};
|
|
43
43
|
});
|
|
44
|
-
const { getByTestId } = render(React.createElement(UrlEditor, {
|
|
44
|
+
const { getByTestId } = render(/*#__PURE__*/ React.createElement(UrlEditor, {
|
|
45
45
|
field: field,
|
|
46
46
|
isInitiallyDisabled: false
|
|
47
47
|
}));
|
|
@@ -79,11 +79,11 @@ describe('UrlEditor', ()=>{
|
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
81
|
});
|
|
82
|
-
const { getByTestId, getByText } = render(React.createElement(UrlEditor, {
|
|
82
|
+
const { getByTestId, getByText } = render(/*#__PURE__*/ React.createElement(UrlEditor, {
|
|
83
83
|
field: field,
|
|
84
84
|
isInitiallyDisabled: false
|
|
85
85
|
}, ({ value })=>{
|
|
86
|
-
return React.createElement("div", null, "Custom preview: ", value);
|
|
86
|
+
return /*#__PURE__*/ React.createElement("div", null, "Custom preview: ", value);
|
|
87
87
|
}));
|
|
88
88
|
const $input = getByTestId('cf-ui-text-input');
|
|
89
89
|
expect($input).toHaveValue(initialValue);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/field-editor-url",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.7",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -37,7 +37,7 @@
|
|
|
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
|
},
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"publishConfig": {
|
|
51
51
|
"registry": "https://npm.pkg.github.com/"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "44e5546797a12db4d96f290e039a483297265ffa"
|
|
54
54
|
}
|