@contentful/field-editor-json 3.3.6 → 3.3.9
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/JsonEditor.js +4 -2
- package/dist/cjs/JsonEditorField.js +3 -1
- package/dist/cjs/JsonEditorToolbar.js +3 -1
- package/dist/cjs/JsonInvalidStatus.js +3 -1
- package/dist/cjs/utils.js +3 -3
- package/dist/esm/JsonEditor.js +1 -1
- package/dist/types/JsonEditor.d.ts +2 -2
- package/dist/types/JsonEditorField.d.ts +2 -2
- package/dist/types/JsonEditorToolbar.d.ts +2 -2
- package/dist/types/JsonInvalidStatus.d.ts +2 -2
- package/package.json +7 -4
package/dist/cjs/JsonEditor.js
CHANGED
|
@@ -55,7 +55,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
55
55
|
if (cache && cache.has(obj)) {
|
|
56
56
|
return cache.get(obj);
|
|
57
57
|
}
|
|
58
|
-
var newObj = {
|
|
58
|
+
var newObj = {
|
|
59
|
+
__proto__: null
|
|
60
|
+
};
|
|
59
61
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
60
62
|
for(var key in obj){
|
|
61
63
|
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
@@ -183,7 +185,7 @@ function JsonEditor(props) {
|
|
|
183
185
|
isEqualValues: (value1, value2)=>{
|
|
184
186
|
return (0, _deepequal.default)(value1, value2);
|
|
185
187
|
}
|
|
186
|
-
}, ({ value
|
|
188
|
+
}, ({ value, disabled, setValue, externalReset })=>{
|
|
187
189
|
return _react.createElement(ConnectedJsonEditor, {
|
|
188
190
|
key: `json-editor-${externalReset}`,
|
|
189
191
|
initialValue: value,
|
|
@@ -42,7 +42,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
42
42
|
if (cache && cache.has(obj)) {
|
|
43
43
|
return cache.get(obj);
|
|
44
44
|
}
|
|
45
|
-
var newObj = {
|
|
45
|
+
var newObj = {
|
|
46
|
+
__proto__: null
|
|
47
|
+
};
|
|
46
48
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
47
49
|
for(var key in obj){
|
|
48
50
|
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
@@ -38,7 +38,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
38
38
|
if (cache && cache.has(obj)) {
|
|
39
39
|
return cache.get(obj);
|
|
40
40
|
}
|
|
41
|
-
var newObj = {
|
|
41
|
+
var newObj = {
|
|
42
|
+
__proto__: null
|
|
43
|
+
};
|
|
42
44
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
43
45
|
for(var key in obj){
|
|
44
46
|
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
@@ -38,7 +38,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
38
38
|
if (cache && cache.has(obj)) {
|
|
39
39
|
return cache.get(obj);
|
|
40
40
|
}
|
|
41
|
-
var newObj = {
|
|
41
|
+
var newObj = {
|
|
42
|
+
__proto__: null
|
|
43
|
+
};
|
|
42
44
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
43
45
|
for(var key in obj){
|
|
44
46
|
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
package/dist/cjs/utils.js
CHANGED
|
@@ -12,14 +12,14 @@ _export(exports, {
|
|
|
12
12
|
SPACE_INDENT_COUNT: function() {
|
|
13
13
|
return SPACE_INDENT_COUNT;
|
|
14
14
|
},
|
|
15
|
-
stringifyJSON: function() {
|
|
16
|
-
return stringifyJSON;
|
|
17
|
-
},
|
|
18
15
|
isValidJson: function() {
|
|
19
16
|
return isValidJson;
|
|
20
17
|
},
|
|
21
18
|
parseJSON: function() {
|
|
22
19
|
return parseJSON;
|
|
20
|
+
},
|
|
21
|
+
stringifyJSON: function() {
|
|
22
|
+
return stringifyJSON;
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
const SPACE_INDENT_COUNT = 4;
|
package/dist/esm/JsonEditor.js
CHANGED
|
@@ -129,7 +129,7 @@ export default function JsonEditor(props) {
|
|
|
129
129
|
isEqualValues: (value1, value2)=>{
|
|
130
130
|
return deepEqual(value1, value2);
|
|
131
131
|
}
|
|
132
|
-
}, ({ value
|
|
132
|
+
}, ({ value, disabled, setValue, externalReset })=>{
|
|
133
133
|
return React.createElement(ConnectedJsonEditor, {
|
|
134
134
|
key: `json-editor-${externalReset}`,
|
|
135
135
|
initialValue: value,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { FieldAPI } from '@contentful/field-editor-shared';
|
|
3
3
|
export interface JsonEditorProps {
|
|
4
4
|
/**
|
|
@@ -10,7 +10,7 @@ export interface JsonEditorProps {
|
|
|
10
10
|
*/
|
|
11
11
|
field: FieldAPI;
|
|
12
12
|
}
|
|
13
|
-
declare function JsonEditor(props: JsonEditorProps):
|
|
13
|
+
declare function JsonEditor(props: JsonEditorProps): JSX.Element;
|
|
14
14
|
declare namespace JsonEditor {
|
|
15
15
|
var tabWidth: number;
|
|
16
16
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
type JsonEditorFieldProps = {
|
|
3
3
|
isDisabled: boolean;
|
|
4
4
|
value: string;
|
|
5
5
|
onChange: (value: string) => void;
|
|
6
6
|
};
|
|
7
|
-
export declare function JsonEditorField(props: JsonEditorFieldProps):
|
|
7
|
+
export declare function JsonEditorField(props: JsonEditorFieldProps): JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
type JsonEditorToolbarProps = {
|
|
3
3
|
isUndoDisabled: boolean;
|
|
4
4
|
isRedoDisabled: boolean;
|
|
5
5
|
onRedo: () => void;
|
|
6
6
|
onUndo: () => void;
|
|
7
7
|
};
|
|
8
|
-
export declare function JsonEditorToolbar(props: JsonEditorToolbarProps):
|
|
8
|
+
export declare function JsonEditorToolbar(props: JsonEditorToolbarProps): JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function JsonInvalidStatus():
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare function JsonInvalidStatus(): JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/field-editor-json",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.9",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@codemirror/lang-json": "^6.0.0",
|
|
37
37
|
"@contentful/f36-components": "^4.0.27",
|
|
38
38
|
"@contentful/f36-tokens": "^4.0.0",
|
|
39
|
-
"@contentful/field-editor-shared": "^1.4.
|
|
39
|
+
"@contentful/field-editor-shared": "^1.4.5",
|
|
40
40
|
"@types/deep-equal": "1.0.1",
|
|
41
41
|
"@types/react-codemirror": "1.0.3",
|
|
42
42
|
"@uiw/react-codemirror": "^4.11.4",
|
|
@@ -45,10 +45,13 @@
|
|
|
45
45
|
"lodash": "^4.17.15"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@contentful/field-editor-test-utils": "^1.4.
|
|
48
|
+
"@contentful/field-editor-test-utils": "^1.4.6"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"react": ">=16.8.0"
|
|
52
52
|
},
|
|
53
|
-
"
|
|
53
|
+
"publishConfig": {
|
|
54
|
+
"registry": "https://npm.pkg.github.com/"
|
|
55
|
+
},
|
|
56
|
+
"gitHead": "142d2039f023bf4ced956aae1dd08b27c35fdbaa"
|
|
54
57
|
}
|