@contentful/field-editor-json 4.4.3-canary.28 → 4.4.3-canary.30

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.
@@ -151,24 +151,24 @@ function ConnectedJsonEditor({ initialValue, setValue, disabled }) {
151
151
  ]
152
152
  }));
153
153
  }, []);
154
- return /*#__PURE__*/ _react.createElement("div", {
154
+ return _react.createElement("div", {
155
155
  "data-test-id": "json-editor"
156
- }, /*#__PURE__*/ _react.createElement(_JsonEditorToolbar.JsonEditorToolbar, {
156
+ }, _react.createElement(_JsonEditorToolbar.JsonEditorToolbar, {
157
157
  isRedoDisabled: disabled || state.redoStack.length === 0,
158
158
  isUndoDisabled: disabled || state.undoStack.length === 0,
159
159
  onUndo: onUndo,
160
160
  onRedo: onRedo
161
- }), /*#__PURE__*/ _react.createElement(_JsonEditorField.JsonEditorField, {
161
+ }), _react.createElement(_JsonEditorField.JsonEditorField, {
162
162
  value: state.value,
163
163
  onChange: onChange,
164
164
  isDisabled: disabled
165
- }), !state.isValidJson && /*#__PURE__*/ _react.createElement(_JsonInvalidStatus.JsonInvalidStatus, null));
165
+ }), !state.isValidJson && _react.createElement(_JsonInvalidStatus.JsonInvalidStatus, null));
166
166
  }
167
167
  function JsonEditor(props) {
168
- return /*#__PURE__*/ _react.createElement(_fieldeditorshared.FieldConnector, {
168
+ return _react.createElement(_fieldeditorshared.FieldConnector, {
169
169
  field: props.field,
170
170
  isInitiallyDisabled: props.isInitiallyDisabled
171
- }, ({ value, disabled, setValue, externalReset })=>/*#__PURE__*/ _react.createElement(ConnectedJsonEditor, {
171
+ }, ({ value, disabled, setValue, externalReset })=>_react.createElement(ConnectedJsonEditor, {
172
172
  key: `json-editor-${externalReset}`,
173
173
  initialValue: value,
174
174
  disabled: disabled,
@@ -101,12 +101,12 @@ const styles = {
101
101
  })
102
102
  };
103
103
  function JsonEditorField(props) {
104
- return /*#__PURE__*/ _react.createElement("div", {
104
+ return _react.createElement("div", {
105
105
  className: (0, _css.cx)(styles.root, {
106
106
  disabled: props.isDisabled
107
107
  }),
108
108
  "data-test-id": "json-editor-code-mirror"
109
- }, /*#__PURE__*/ _react.createElement(_reactcodemirror.default, {
109
+ }, _react.createElement(_reactcodemirror.default, {
110
110
  value: props.value,
111
111
  onChange: props.onChange,
112
112
  theme: "light",
@@ -77,14 +77,14 @@ const styles = {
77
77
  })
78
78
  };
79
79
  function JsonEditorToolbar(props) {
80
- return /*#__PURE__*/ _react.createElement("div", {
80
+ return _react.createElement("div", {
81
81
  className: styles.toolbar
82
- }, /*#__PURE__*/ _react.createElement(_f36components.Flex, {
82
+ }, _react.createElement(_f36components.Flex, {
83
83
  alignItems: "center"
84
- }, /*#__PURE__*/ _react.createElement(_f36components.Button, {
84
+ }, _react.createElement(_f36components.Button, {
85
85
  className: styles.arrowButton,
86
86
  variant: "transparent",
87
- startIcon: /*#__PURE__*/ _react.createElement(_f36icons.ArrowUUpLeftIcon, {
87
+ startIcon: _react.createElement(_f36icons.ArrowUUpLeftIcon, {
88
88
  size: "small"
89
89
  }),
90
90
  size: "small",
@@ -93,11 +93,11 @@ function JsonEditorToolbar(props) {
93
93
  onClick: ()=>{
94
94
  props.onUndo();
95
95
  }
96
- }, "Undo"), /*#__PURE__*/ _react.createElement(_f36components.Button, {
96
+ }, "Undo"), _react.createElement(_f36components.Button, {
97
97
  className: styles.arrowButton,
98
98
  variant: "transparent",
99
99
  size: "small",
100
- startIcon: /*#__PURE__*/ _react.createElement(_f36icons.ArrowUUpRightIcon, {
100
+ startIcon: _react.createElement(_f36icons.ArrowUUpRightIcon, {
101
101
  size: "small"
102
102
  }),
103
103
  isDisabled: props.isRedoDisabled,
@@ -60,13 +60,13 @@ function _interop_require_wildcard(obj, nodeInterop) {
60
60
  return newObj;
61
61
  }
62
62
  function JsonInvalidStatus() {
63
- return /*#__PURE__*/ _react.createElement("div", {
63
+ return _react.createElement("div", {
64
64
  role: "status",
65
65
  "data-test-id": "json-editor.invalid-json",
66
66
  className: (0, _css.css)({
67
67
  marginTop: _f36tokens.default.spacingS
68
68
  })
69
- }, /*#__PURE__*/ _react.createElement(_f36components.ValidationMessage, null, _core.i18n._({
69
+ }, _react.createElement(_f36components.ValidationMessage, null, _core.i18n._({
70
70
  id: "FieldEditors.Json.JsonInvalidStatus.InvalidJsonMessage",
71
71
  message: "This is not valid JSON"
72
72
  })));
package/dist/cjs/utils.js CHANGED
@@ -5,20 +5,20 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- SPACE_INDENT_COUNT: function() {
12
+ get SPACE_INDENT_COUNT () {
13
13
  return SPACE_INDENT_COUNT;
14
14
  },
15
- isValidJson: function() {
15
+ get isValidJson () {
16
16
  return isValidJson;
17
17
  },
18
- parseJSON: function() {
18
+ get parseJSON () {
19
19
  return parseJSON;
20
20
  },
21
- stringifyJSON: function() {
21
+ get stringifyJSON () {
22
22
  return stringifyJSON;
23
23
  }
24
24
  });
@@ -95,24 +95,24 @@ function ConnectedJsonEditor({ initialValue, setValue, disabled }) {
95
95
  ]
96
96
  }));
97
97
  }, []);
98
- return /*#__PURE__*/ React.createElement("div", {
98
+ return React.createElement("div", {
99
99
  "data-test-id": "json-editor"
100
- }, /*#__PURE__*/ React.createElement(JsonEditorToolbar, {
100
+ }, React.createElement(JsonEditorToolbar, {
101
101
  isRedoDisabled: disabled || state.redoStack.length === 0,
102
102
  isUndoDisabled: disabled || state.undoStack.length === 0,
103
103
  onUndo: onUndo,
104
104
  onRedo: onRedo
105
- }), /*#__PURE__*/ React.createElement(JsonEditorField, {
105
+ }), React.createElement(JsonEditorField, {
106
106
  value: state.value,
107
107
  onChange: onChange,
108
108
  isDisabled: disabled
109
- }), !state.isValidJson && /*#__PURE__*/ React.createElement(JsonInvalidStatus, null));
109
+ }), !state.isValidJson && React.createElement(JsonInvalidStatus, null));
110
110
  }
111
111
  export default function JsonEditor(props) {
112
- return /*#__PURE__*/ React.createElement(FieldConnector, {
112
+ return React.createElement(FieldConnector, {
113
113
  field: props.field,
114
114
  isInitiallyDisabled: props.isInitiallyDisabled
115
- }, ({ value, disabled, setValue, externalReset })=>/*#__PURE__*/ React.createElement(ConnectedJsonEditor, {
115
+ }, ({ value, disabled, setValue, externalReset })=>React.createElement(ConnectedJsonEditor, {
116
116
  key: `json-editor-${externalReset}`,
117
117
  initialValue: value,
118
118
  disabled: disabled,
@@ -45,12 +45,12 @@ const styles = {
45
45
  })
46
46
  };
47
47
  export function JsonEditorField(props) {
48
- return /*#__PURE__*/ React.createElement("div", {
48
+ return React.createElement("div", {
49
49
  className: cx(styles.root, {
50
50
  disabled: props.isDisabled
51
51
  }),
52
52
  "data-test-id": "json-editor-code-mirror"
53
- }, /*#__PURE__*/ React.createElement(CodeMirror, {
53
+ }, React.createElement(CodeMirror, {
54
54
  value: props.value,
55
55
  onChange: props.onChange,
56
56
  theme: "light",
@@ -21,14 +21,14 @@ const styles = {
21
21
  })
22
22
  };
23
23
  export function JsonEditorToolbar(props) {
24
- return /*#__PURE__*/ React.createElement("div", {
24
+ return React.createElement("div", {
25
25
  className: styles.toolbar
26
- }, /*#__PURE__*/ React.createElement(Flex, {
26
+ }, React.createElement(Flex, {
27
27
  alignItems: "center"
28
- }, /*#__PURE__*/ React.createElement(Button, {
28
+ }, React.createElement(Button, {
29
29
  className: styles.arrowButton,
30
30
  variant: "transparent",
31
- startIcon: /*#__PURE__*/ React.createElement(ArrowUUpLeftIcon, {
31
+ startIcon: React.createElement(ArrowUUpLeftIcon, {
32
32
  size: "small"
33
33
  }),
34
34
  size: "small",
@@ -37,11 +37,11 @@ export function JsonEditorToolbar(props) {
37
37
  onClick: ()=>{
38
38
  props.onUndo();
39
39
  }
40
- }, "Undo"), /*#__PURE__*/ React.createElement(Button, {
40
+ }, "Undo"), React.createElement(Button, {
41
41
  className: styles.arrowButton,
42
42
  variant: "transparent",
43
43
  size: "small",
44
- startIcon: /*#__PURE__*/ React.createElement(ArrowUUpRightIcon, {
44
+ startIcon: React.createElement(ArrowUUpRightIcon, {
45
45
  size: "small"
46
46
  }),
47
47
  isDisabled: props.isRedoDisabled,
@@ -4,13 +4,13 @@ import tokens from '@contentful/f36-tokens';
4
4
  import { css } from '@emotion/css';
5
5
  import { i18n as $_i18n } from "@lingui/core";
6
6
  export function JsonInvalidStatus() {
7
- return /*#__PURE__*/ React.createElement("div", {
7
+ return React.createElement("div", {
8
8
  role: "status",
9
9
  "data-test-id": "json-editor.invalid-json",
10
10
  className: css({
11
11
  marginTop: tokens.spacingS
12
12
  })
13
- }, /*#__PURE__*/ React.createElement(ValidationMessage, null, $_i18n._({
13
+ }, React.createElement(ValidationMessage, null, $_i18n._({
14
14
  id: "FieldEditors.Json.JsonInvalidStatus.InvalidJsonMessage",
15
15
  message: "This is not valid JSON"
16
16
  })));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-json",
3
- "version": "4.4.3-canary.28+dce976a5",
3
+ "version": "4.4.3-canary.30+0e4621f9",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -42,7 +42,7 @@
42
42
  "@contentful/f36-components": "^6.7.1",
43
43
  "@contentful/f36-icons": "^6.7.1",
44
44
  "@contentful/f36-tokens": "^6.1.2",
45
- "@contentful/field-editor-shared": "^4.6.3-canary.28+dce976a5",
45
+ "@contentful/field-editor-shared": "^4.6.3-canary.30+0e4621f9",
46
46
  "@emotion/css": "^11.13.5",
47
47
  "@types/react-codemirror": "1.0.11",
48
48
  "@uiw/react-codemirror": "^4.11.4",
@@ -50,7 +50,7 @@
50
50
  },
51
51
  "devDependencies": {
52
52
  "@contentful/field-editor-test-utils": "^3.2.1",
53
- "@lingui/core": "5.3.0"
53
+ "@lingui/core": "5.9.5"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "@lingui/core": "^5.3.0",
@@ -66,5 +66,5 @@
66
66
  "prettier --write"
67
67
  ]
68
68
  },
69
- "gitHead": "dce976a59659a0c2ef12511f9449ac0100a50987"
69
+ "gitHead": "0e4621f97b3a6b65da12df50fa740c00bcd17b1f"
70
70
  }