@contentful/field-editor-validation-errors 1.3.6 → 1.3.7
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.
|
@@ -34,7 +34,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
34
34
|
if (cache && cache.has(obj)) {
|
|
35
35
|
return cache.get(obj);
|
|
36
36
|
}
|
|
37
|
-
var newObj = {
|
|
37
|
+
var newObj = {
|
|
38
|
+
__proto__: null
|
|
39
|
+
};
|
|
38
40
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
39
41
|
for(var key in obj){
|
|
40
42
|
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
@@ -91,7 +93,7 @@ function UniquenessError(props) {
|
|
|
91
93
|
const query = {
|
|
92
94
|
'sys.id[in]': conflictIds.join(',')
|
|
93
95
|
};
|
|
94
|
-
props.space.getEntries(query).then(({ items
|
|
96
|
+
props.space.getEntries(query).then(({ items })=>{
|
|
95
97
|
const entries = items.map((entry)=>({
|
|
96
98
|
id: entry.sys.id,
|
|
97
99
|
title: getTitle(entry),
|
|
@@ -28,7 +28,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
28
28
|
if (cache && cache.has(obj)) {
|
|
29
29
|
return cache.get(obj);
|
|
30
30
|
}
|
|
31
|
-
var newObj = {
|
|
31
|
+
var newObj = {
|
|
32
|
+
__proto__: null
|
|
33
|
+
};
|
|
32
34
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
33
35
|
for(var key in obj){
|
|
34
36
|
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
@@ -83,7 +85,7 @@ describe('ValidationErrors', ()=>{
|
|
|
83
85
|
afterEach(_react1.cleanup);
|
|
84
86
|
it('renders without crashing', ()=>{
|
|
85
87
|
const [field] = _fieldeditortestutils.createFakeFieldAPI();
|
|
86
|
-
const { container
|
|
88
|
+
const { container } = (0, _react1.render)(_react.createElement(_ValidationErrors.ValidationErrors, {
|
|
87
89
|
field: field,
|
|
88
90
|
space: _fieldeditortestutils.createFakeSpaceAPI(),
|
|
89
91
|
locales: _fieldeditortestutils.createFakeLocalesAPI(),
|
|
@@ -100,7 +102,7 @@ describe('ValidationErrors', ()=>{
|
|
|
100
102
|
}
|
|
101
103
|
];
|
|
102
104
|
const [field, emitter] = _fieldeditortestutils.createFakeFieldAPI();
|
|
103
|
-
const { findByText
|
|
105
|
+
const { findByText } = (0, _react1.render)(_react.createElement(_ValidationErrors.ValidationErrors, {
|
|
104
106
|
field: field,
|
|
105
107
|
space: _fieldeditortestutils.createFakeSpaceAPI(),
|
|
106
108
|
locales: _fieldeditortestutils.createFakeLocalesAPI(),
|
|
@@ -145,7 +147,7 @@ describe('ValidationErrors', ()=>{
|
|
|
145
147
|
items: ids.map(createEntry)
|
|
146
148
|
})
|
|
147
149
|
}));
|
|
148
|
-
const { findByText
|
|
150
|
+
const { findByText, findAllByTestId } = (0, _react1.render)(_react.createElement(_ValidationErrors.ValidationErrors, {
|
|
149
151
|
field: field,
|
|
150
152
|
space: space,
|
|
151
153
|
locales: _fieldeditortestutils.createFakeLocalesAPI(),
|
package/dist/cjs/styles.js
CHANGED
|
@@ -9,17 +9,17 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
+
entryLink: function() {
|
|
13
|
+
return entryLink;
|
|
14
|
+
},
|
|
15
|
+
errorItem: function() {
|
|
16
|
+
return errorItem;
|
|
17
|
+
},
|
|
12
18
|
errorList: function() {
|
|
13
19
|
return errorList;
|
|
14
20
|
},
|
|
15
21
|
errorMessage: function() {
|
|
16
22
|
return errorMessage;
|
|
17
|
-
},
|
|
18
|
-
errorItem: function() {
|
|
19
|
-
return errorItem;
|
|
20
|
-
},
|
|
21
|
-
entryLink: function() {
|
|
22
|
-
return entryLink;
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
const _f36tokens = _interop_require_default(require("@contentful/f36-tokens"));
|
|
@@ -42,7 +42,7 @@ function UniquenessError(props) {
|
|
|
42
42
|
const query = {
|
|
43
43
|
'sys.id[in]': conflictIds.join(',')
|
|
44
44
|
};
|
|
45
|
-
props.space.getEntries(query).then(({ items
|
|
45
|
+
props.space.getEntries(query).then(({ items })=>{
|
|
46
46
|
const entries = items.map((entry)=>({
|
|
47
47
|
id: entry.sys.id,
|
|
48
48
|
title: getTitle(entry),
|
|
@@ -40,7 +40,7 @@ describe('ValidationErrors', ()=>{
|
|
|
40
40
|
afterEach(cleanup);
|
|
41
41
|
it('renders without crashing', ()=>{
|
|
42
42
|
const [field] = utils.createFakeFieldAPI();
|
|
43
|
-
const { container
|
|
43
|
+
const { container } = render(React.createElement(ValidationErrors, {
|
|
44
44
|
field: field,
|
|
45
45
|
space: utils.createFakeSpaceAPI(),
|
|
46
46
|
locales: utils.createFakeLocalesAPI(),
|
|
@@ -57,7 +57,7 @@ describe('ValidationErrors', ()=>{
|
|
|
57
57
|
}
|
|
58
58
|
];
|
|
59
59
|
const [field, emitter] = utils.createFakeFieldAPI();
|
|
60
|
-
const { findByText
|
|
60
|
+
const { findByText } = render(React.createElement(ValidationErrors, {
|
|
61
61
|
field: field,
|
|
62
62
|
space: utils.createFakeSpaceAPI(),
|
|
63
63
|
locales: utils.createFakeLocalesAPI(),
|
|
@@ -102,7 +102,7 @@ describe('ValidationErrors', ()=>{
|
|
|
102
102
|
items: ids.map(createEntry)
|
|
103
103
|
})
|
|
104
104
|
}));
|
|
105
|
-
const { findByText
|
|
105
|
+
const { findByText, findAllByTestId } = render(React.createElement(ValidationErrors, {
|
|
106
106
|
field: field,
|
|
107
107
|
space: space,
|
|
108
108
|
locales: utils.createFakeLocalesAPI(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/field-editor-validation-errors",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.7",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
"@contentful/f36-components": "^4.0.27",
|
|
39
39
|
"@contentful/f36-icons": "^4.1.0",
|
|
40
40
|
"@contentful/f36-tokens": "^4.0.0",
|
|
41
|
-
"@contentful/field-editor-shared": "^1.4.
|
|
41
|
+
"@contentful/field-editor-shared": "^1.4.5",
|
|
42
42
|
"emotion": "^10.0.17"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@contentful/field-editor-test-utils": "^1.4.
|
|
45
|
+
"@contentful/field-editor-test-utils": "^1.4.6"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"react": ">=16.8.0"
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"publishConfig": {
|
|
51
51
|
"registry": "https://npm.pkg.github.com/"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "142d2039f023bf4ced956aae1dd08b27c35fdbaa"
|
|
54
54
|
}
|