@contentful/field-editor-boolean 1.8.2 → 1.8.3-canary.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.
@@ -11,6 +11,7 @@ Object.defineProperty(exports, "BooleanEditor", {
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 _get = /*#__PURE__*/ _interop_require_default(require("lodash/get"));
15
16
  const _nanoid = require("nanoid");
16
17
  function _interop_require_default(obj) {
@@ -67,7 +68,10 @@ function BooleanEditor(props) {
67
68
  label: (0, _get.default)(props.parameters, [
68
69
  'instance',
69
70
  'trueLabel'
70
- ], 'Yes'),
71
+ ], _core.i18n._({
72
+ id: "FieldEditors.Boolean.BooleanEditor.TrueDefaultLabel",
73
+ message: "Yes"
74
+ })),
71
75
  id: (0, _nanoid.nanoid)(6)
72
76
  },
73
77
  {
@@ -75,7 +79,10 @@ function BooleanEditor(props) {
75
79
  label: (0, _get.default)(props.parameters, [
76
80
  'instance',
77
81
  'falseLabel'
78
- ], 'No'),
82
+ ], _core.i18n._({
83
+ id: "FieldEditors.Boolean.BooleanEditor.FalseDefaultLabel",
84
+ message: "No"
85
+ })),
79
86
  id: (0, _nanoid.nanoid)(6)
80
87
  }
81
88
  ];
@@ -122,7 +129,10 @@ function BooleanEditor(props) {
122
129
  testId: "boolean-editor-clear",
123
130
  isDisabled: disabled,
124
131
  onClick: clearOption
125
- }, "Clear"));
132
+ }, _core.i18n._({
133
+ id: "FieldEditors.Boolean.BooleanEditor.ClearLabel",
134
+ message: "Clear"
135
+ })));
126
136
  });
127
137
  }
128
138
  BooleanEditor.defaultProps = {
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { TextLink, Flex, Radio } from '@contentful/f36-components';
3
3
  import { FieldConnector } from '@contentful/field-editor-shared';
4
+ import { i18n as $_i18n } from "@lingui/core";
4
5
  import get from 'lodash/get';
5
6
  import { nanoid } from 'nanoid';
6
7
  export function BooleanEditor(props) {
@@ -11,7 +12,10 @@ export function BooleanEditor(props) {
11
12
  label: get(props.parameters, [
12
13
  'instance',
13
14
  'trueLabel'
14
- ], 'Yes'),
15
+ ], $_i18n._({
16
+ id: "FieldEditors.Boolean.BooleanEditor.TrueDefaultLabel",
17
+ message: "Yes"
18
+ })),
15
19
  id: nanoid(6)
16
20
  },
17
21
  {
@@ -19,7 +23,10 @@ export function BooleanEditor(props) {
19
23
  label: get(props.parameters, [
20
24
  'instance',
21
25
  'falseLabel'
22
- ], 'No'),
26
+ ], $_i18n._({
27
+ id: "FieldEditors.Boolean.BooleanEditor.FalseDefaultLabel",
28
+ message: "No"
29
+ })),
23
30
  id: nanoid(6)
24
31
  }
25
32
  ];
@@ -66,7 +73,10 @@ export function BooleanEditor(props) {
66
73
  testId: "boolean-editor-clear",
67
74
  isDisabled: disabled,
68
75
  onClick: clearOption
69
- }, "Clear"));
76
+ }, $_i18n._({
77
+ id: "FieldEditors.Boolean.BooleanEditor.ClearLabel",
78
+ message: "Clear"
79
+ })));
70
80
  });
71
81
  }
72
82
  BooleanEditor.defaultProps = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-boolean",
3
- "version": "1.8.2",
3
+ "version": "1.8.3-canary.1+168bff6f",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -37,12 +37,12 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@contentful/f36-components": "^5.4.1",
40
- "@contentful/field-editor-shared": "^2.17.1",
40
+ "@contentful/field-editor-shared": "^2.17.2-canary.1+168bff6f",
41
41
  "lodash": "^4.17.15",
42
42
  "nanoid": "^3.1.3"
43
43
  },
44
44
  "devDependencies": {
45
- "@contentful/field-editor-test-utils": "^1.7.0",
45
+ "@contentful/field-editor-test-utils": "^1.7.1-canary.76+168bff6f",
46
46
  "@lingui/core": "5.3.0"
47
47
  },
48
48
  "peerDependencies": {
@@ -52,5 +52,5 @@
52
52
  "publishConfig": {
53
53
  "registry": "https://npm.pkg.github.com/"
54
54
  },
55
- "gitHead": "c8fbf95fbb880df05fd011b8892523c135c2a5fd"
55
+ "gitHead": "168bff6f172e483def0432b3095e8f0a2af37b1f"
56
56
  }