@contentful/field-editor-url 1.3.34 → 1.4.0
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
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "UrlEditor", {
|
|
|
8
8
|
return UrlEditor;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const _react = _interop_require_wildcard(require("react"));
|
|
11
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
12
12
|
const _f36components = require("@contentful/f36-components");
|
|
13
13
|
const _fieldeditorshared = require("@contentful/field-editor-shared");
|
|
14
14
|
function _getRequireWildcardCache(nodeInterop) {
|
|
@@ -53,7 +53,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
53
53
|
return newObj;
|
|
54
54
|
}
|
|
55
55
|
function UrlEditor(props) {
|
|
56
|
-
const { field } = props;
|
|
56
|
+
const { field, id } = props;
|
|
57
57
|
return _react.createElement(_fieldeditorshared.FieldConnector, {
|
|
58
58
|
field: field,
|
|
59
59
|
isInitiallyDisabled: props.isInitiallyDisabled
|
|
@@ -61,6 +61,7 @@ function UrlEditor(props) {
|
|
|
61
61
|
return _react.createElement("div", {
|
|
62
62
|
"data-test-id": "url-editor"
|
|
63
63
|
}, _react.createElement(_f36components.TextInput, {
|
|
64
|
+
id: id,
|
|
64
65
|
isRequired: field.required,
|
|
65
66
|
isInvalid: errors.length > 0,
|
|
66
67
|
isDisabled: disabled,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
const _react = _interop_require_wildcard(require("react"));
|
|
5
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
6
6
|
const _fieldeditortestutils = require("@contentful/field-editor-test-utils");
|
|
7
7
|
const _react1 = require("@testing-library/react");
|
|
8
8
|
require("@testing-library/jest-dom/extend-expect");
|
package/dist/esm/UrlEditor.js
CHANGED
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { TextInput } from '@contentful/f36-components';
|
|
3
3
|
import { FieldConnector } from '@contentful/field-editor-shared';
|
|
4
4
|
export function UrlEditor(props) {
|
|
5
|
-
const { field } = props;
|
|
5
|
+
const { field, id } = props;
|
|
6
6
|
return React.createElement(FieldConnector, {
|
|
7
7
|
field: field,
|
|
8
8
|
isInitiallyDisabled: props.isInitiallyDisabled
|
|
@@ -10,6 +10,7 @@ export function UrlEditor(props) {
|
|
|
10
10
|
return React.createElement("div", {
|
|
11
11
|
"data-test-id": "url-editor"
|
|
12
12
|
}, React.createElement(TextInput, {
|
|
13
|
+
id: id,
|
|
13
14
|
isRequired: field.required,
|
|
14
15
|
isInvalid: errors.length > 0,
|
|
15
16
|
isDisabled: disabled,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { FieldAPI } from '@contentful/field-editor-shared';
|
|
2
|
+
import { type FieldAPI } from '@contentful/field-editor-shared';
|
|
3
3
|
export interface UrlEditorProps {
|
|
4
4
|
/**
|
|
5
5
|
* is the field disabled initially
|
|
@@ -9,6 +9,10 @@ export interface UrlEditorProps {
|
|
|
9
9
|
* sdk.field
|
|
10
10
|
*/
|
|
11
11
|
field: FieldAPI;
|
|
12
|
+
/**
|
|
13
|
+
* id used for associating the input field with its label
|
|
14
|
+
*/
|
|
15
|
+
id?: string;
|
|
12
16
|
children?: (props: {
|
|
13
17
|
value: string | null | undefined;
|
|
14
18
|
}) => React.ReactNode;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/field-editor-url",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
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.4.
|
|
40
|
+
"@contentful/field-editor-shared": "^2.4.1",
|
|
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": "7ec565308c8d4da384b8fec6f5d840bdf6d4927d"
|
|
54
54
|
}
|