@contentful/field-editor-reference 6.22.1-canary.4 → 6.22.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.
- package/dist/cjs/common/MultipleReferenceEditor.js +2 -2
- package/dist/cjs/common/SingleReferenceEditor.js +2 -2
- package/dist/cjs/common/queryClient.js +4 -4
- package/dist/cjs/resources/Cards/ResourceCard.spec.js +2 -2
- package/dist/esm/common/MultipleReferenceEditor.js +1 -1
- package/dist/esm/common/SingleReferenceEditor.js +1 -1
- package/dist/esm/common/queryClient.js +1 -1
- package/dist/esm/resources/Cards/ResourceCard.spec.js +1 -1
- package/dist/types/__fixtures__/fixtures.d.ts +1 -1
- package/dist/types/common/queryClient.d.ts +1 -1
- package/package.json +5 -5
|
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "MultipleReferenceEditor", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
12
|
-
const
|
|
12
|
+
const _reactquery = require("@contentful/field-editor-shared/react-query");
|
|
13
13
|
const _sortable = require("@dnd-kit/sortable");
|
|
14
14
|
const _components = require("../components");
|
|
15
15
|
const _LinkEntityActions = require("../components/LinkActions/LinkEntityActions");
|
|
@@ -150,7 +150,7 @@ function MultipleReferenceEditor(props) {
|
|
|
150
150
|
return /*#__PURE__*/ _react.createElement(_queryClient.SharedQueryClientProvider, null, /*#__PURE__*/ _react.createElement(MultipleReferenceEditorInner, props));
|
|
151
151
|
}
|
|
152
152
|
function MultipleReferenceEditorInner(props) {
|
|
153
|
-
const { contentTypes: allContentTypes } = (0,
|
|
153
|
+
const { contentTypes: allContentTypes } = (0, _reactquery.useContentTypes)(props.sdk);
|
|
154
154
|
return /*#__PURE__*/ _react.createElement(_ReferenceEditor.ReferenceEditor, props, ({ value, disabled, setValue, externalReset })=>{
|
|
155
155
|
return /*#__PURE__*/ _react.createElement(Editor, {
|
|
156
156
|
...props,
|
|
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "SingleReferenceEditor", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
12
|
-
const
|
|
12
|
+
const _reactquery = require("@contentful/field-editor-shared/react-query");
|
|
13
13
|
const _components = require("../components");
|
|
14
14
|
const _LinkEntityActions = require("../components/LinkActions/LinkEntityActions");
|
|
15
15
|
const _queryClient = require("./queryClient");
|
|
@@ -108,7 +108,7 @@ function SingleReferenceEditor(props) {
|
|
|
108
108
|
return /*#__PURE__*/ _react.createElement(_queryClient.SharedQueryClientProvider, null, /*#__PURE__*/ _react.createElement(SingleReferenceEditorInner, props));
|
|
109
109
|
}
|
|
110
110
|
function SingleReferenceEditorInner(props) {
|
|
111
|
-
const { contentTypes: allContentTypes } = (0,
|
|
111
|
+
const { contentTypes: allContentTypes } = (0, _reactquery.useContentTypes)(props.sdk);
|
|
112
112
|
return /*#__PURE__*/ _react.createElement(_ReferenceEditor.ReferenceEditor, props, ({ value, setValue, disabled, externalReset })=>{
|
|
113
113
|
return /*#__PURE__*/ _react.createElement(Editor, {
|
|
114
114
|
...props,
|
|
@@ -10,13 +10,13 @@ function _export(target, all) {
|
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
12
|
SharedQueryClientProvider: function() {
|
|
13
|
-
return
|
|
13
|
+
return _reactquery.SharedQueryClientProvider;
|
|
14
14
|
},
|
|
15
15
|
useQuery: function() {
|
|
16
|
-
return
|
|
16
|
+
return _reactquery.useQuery;
|
|
17
17
|
},
|
|
18
18
|
useQueryClient: function() {
|
|
19
|
-
return
|
|
19
|
+
return _reactquery.useQueryClient;
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
|
-
const
|
|
22
|
+
const _reactquery = require("@contentful/field-editor-shared/react-query");
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
6
6
|
require("@testing-library/jest-dom");
|
|
7
|
-
const
|
|
7
|
+
const _reactquery = require("@contentful/field-editor-shared/react-query");
|
|
8
8
|
const _fieldeditortestutils = require("@contentful/field-editor-test-utils");
|
|
9
9
|
const _react1 = require("@testing-library/react");
|
|
10
10
|
const _published_content_typejson = /*#__PURE__*/ _interop_require_default(require("../../__fixtures__/content-type/published_content_type.json"));
|
|
@@ -226,7 +226,7 @@ describe('ResourceCard', ()=>{
|
|
|
226
226
|
resolveEntry = resolve;
|
|
227
227
|
});
|
|
228
228
|
sdk.cma.entry.get.mockReturnValueOnce(pendingPromise);
|
|
229
|
-
const { getByTestId, queryByTestId } = (0, _react1.render)(/*#__PURE__*/ _react.createElement(
|
|
229
|
+
const { getByTestId, queryByTestId } = (0, _react1.render)(/*#__PURE__*/ _react.createElement(_reactquery.SharedQueryClientProvider, {
|
|
230
230
|
client: queryClient
|
|
231
231
|
}, /*#__PURE__*/ _react.createElement(_EntityStore.EntityProvider, {
|
|
232
232
|
sdk: sdk
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useCallback } from 'react';
|
|
3
|
-
import { useContentTypes } from '@contentful/field-editor-shared';
|
|
3
|
+
import { useContentTypes } from '@contentful/field-editor-shared/react-query';
|
|
4
4
|
import { arrayMove } from '@dnd-kit/sortable';
|
|
5
5
|
import { LinkEntityActions } from '../components';
|
|
6
6
|
import { useLinkActionsProps } from '../components/LinkActions/LinkEntityActions';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useCallback } from 'react';
|
|
3
|
-
import { useContentTypes } from '@contentful/field-editor-shared';
|
|
3
|
+
import { useContentTypes } from '@contentful/field-editor-shared/react-query';
|
|
4
4
|
import { LinkEntityActions } from '../components';
|
|
5
5
|
import { useLinkActionsProps } from '../components/LinkActions/LinkEntityActions';
|
|
6
6
|
import { SharedQueryClientProvider } from './queryClient';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { SharedQueryClientProvider, useQueryClient, useQuery } from '@contentful/field-editor-shared';
|
|
1
|
+
export { SharedQueryClientProvider, useQueryClient, useQuery } from '@contentful/field-editor-shared/react-query';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import '@testing-library/jest-dom';
|
|
3
|
-
import { SharedQueryClientProvider } from '@contentful/field-editor-shared';
|
|
3
|
+
import { SharedQueryClientProvider } from '@contentful/field-editor-shared/react-query';
|
|
4
4
|
import { createTestQueryClient } from '@contentful/field-editor-test-utils';
|
|
5
5
|
import { configure, fireEvent, render, waitFor } from '@testing-library/react';
|
|
6
6
|
import publishedCT from '../../__fixtures__/content-type/published_content_type.json';
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Re-export query client utilities from shared package.
|
|
3
3
|
* This maintains backwards compatibility while using the shared implementation.
|
|
4
4
|
*/
|
|
5
|
-
export { SharedQueryClientProvider, useQueryClient, useQuery, } from '@contentful/field-editor-shared';
|
|
5
|
+
export { SharedQueryClientProvider, useQueryClient, useQuery, } from '@contentful/field-editor-shared/react-query';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/field-editor-reference",
|
|
3
|
-
"version": "6.22.1
|
|
3
|
+
"version": "6.22.1",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@contentful/f36-components": "^5.8.1",
|
|
40
40
|
"@contentful/f36-icons": "^5.8.1",
|
|
41
41
|
"@contentful/f36-tokens": "^5.1.0",
|
|
42
|
-
"@contentful/field-editor-shared": "^2.18.1
|
|
42
|
+
"@contentful/field-editor-shared": "^2.18.1",
|
|
43
43
|
"@contentful/mimetype": "^2.2.29",
|
|
44
44
|
"@dnd-kit/core": "^6.0.8",
|
|
45
45
|
"@dnd-kit/sortable": "^8.0.0",
|
|
@@ -55,18 +55,18 @@
|
|
|
55
55
|
"truncate": "^3.0.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@contentful/app-sdk": "4.
|
|
58
|
+
"@contentful/app-sdk": "^4.42.0",
|
|
59
59
|
"@contentful/field-editor-test-utils": "^1.8.0",
|
|
60
60
|
"@lingui/core": "5.3.0",
|
|
61
61
|
"@testing-library/react-hooks": "^8.0.1"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
|
-
"@contentful/app-sdk": "4.
|
|
64
|
+
"@contentful/app-sdk": "^4.41.2",
|
|
65
65
|
"@lingui/core": "^5.3.0",
|
|
66
66
|
"react": ">=16.8.0"
|
|
67
67
|
},
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"registry": "https://npm.pkg.github.com/"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "51e565419e82705b2e2db20e136f50c497f1e8e0"
|
|
72
72
|
}
|