@contentful/field-editor-checkbox 1.5.1 → 1.5.3
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.
|
@@ -11,6 +11,7 @@ Object.defineProperty(exports, "CheckboxEditor", {
|
|
|
11
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
|
+
const _core = require("@lingui/core");
|
|
14
15
|
const _emotion = require("emotion");
|
|
15
16
|
const _get = /*#__PURE__*/ _interop_require_default(require("lodash/get"));
|
|
16
17
|
const _nanoid = require("nanoid");
|
|
@@ -154,11 +155,17 @@ function CheckboxEditor(props) {
|
|
|
154
155
|
}, item.label), item.invalid && /*#__PURE__*/ _react.createElement(_react.Fragment, null, /*#__PURE__*/ _react.createElement("span", {
|
|
155
156
|
"data-test-id": "invalid-text",
|
|
156
157
|
className: _styles.invalidText
|
|
157
|
-
},
|
|
158
|
+
}, _core.i18n._({
|
|
159
|
+
id: "FieldEditors.Checkbox.CheckboxEditor.InvalidText",
|
|
160
|
+
message: "(invalid)"
|
|
161
|
+
})), /*#__PURE__*/ _react.createElement(_f36components.TextLink, {
|
|
158
162
|
as: "button",
|
|
159
163
|
className: _styles.removeBtn,
|
|
160
164
|
onClick: ()=>removeValue(item.value)
|
|
161
|
-
},
|
|
165
|
+
}, _core.i18n._({
|
|
166
|
+
id: "FieldEditors.Checkbox.CheckboxEditor.RemoveButton",
|
|
167
|
+
message: "Remove"
|
|
168
|
+
}))))));
|
|
162
169
|
});
|
|
163
170
|
}
|
|
164
171
|
CheckboxEditor.defaultProps = {
|
|
@@ -3,6 +3,7 @@ import { useState } from 'react';
|
|
|
3
3
|
import { Checkbox, Box } from '@contentful/f36-components';
|
|
4
4
|
import { TextLink, Form } from '@contentful/f36-components';
|
|
5
5
|
import { FieldConnector, PredefinedValuesError } from '@contentful/field-editor-shared';
|
|
6
|
+
import { i18n as $_i18n } from "@lingui/core";
|
|
6
7
|
import { cx } from 'emotion';
|
|
7
8
|
import get from 'lodash/get';
|
|
8
9
|
import { nanoid } from 'nanoid';
|
|
@@ -100,11 +101,17 @@ export function CheckboxEditor(props) {
|
|
|
100
101
|
}, item.label), item.invalid && /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement("span", {
|
|
101
102
|
"data-test-id": "invalid-text",
|
|
102
103
|
className: styles.invalidText
|
|
103
|
-
},
|
|
104
|
+
}, $_i18n._({
|
|
105
|
+
id: "FieldEditors.Checkbox.CheckboxEditor.InvalidText",
|
|
106
|
+
message: "(invalid)"
|
|
107
|
+
})), /*#__PURE__*/ React.createElement(TextLink, {
|
|
104
108
|
as: "button",
|
|
105
109
|
className: styles.removeBtn,
|
|
106
110
|
onClick: ()=>removeValue(item.value)
|
|
107
|
-
},
|
|
111
|
+
}, $_i18n._({
|
|
112
|
+
id: "FieldEditors.Checkbox.CheckboxEditor.RemoveButton",
|
|
113
|
+
message: "Remove"
|
|
114
|
+
}))))));
|
|
108
115
|
});
|
|
109
116
|
}
|
|
110
117
|
CheckboxEditor.defaultProps = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/field-editor-checkbox",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.3",
|
|
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.10.0",
|
|
41
41
|
"emotion": "^10.0.17",
|
|
42
42
|
"lodash": "^4.17.15"
|
|
43
43
|
},
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"publishConfig": {
|
|
53
53
|
"registry": "https://npm.pkg.github.com/"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "be09f0d73046834685814d083141f5166cb64457"
|
|
56
56
|
}
|